Skip to content

Commit

Permalink
feat: add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpastor-ubisoft committed Apr 17, 2024
1 parent acd2390 commit 4a9fc1e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/_components/layout/navigation/menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const LazyMenuContent = dynamic(async (): Promise<{ default: ComponentType<MenuC
}));

export const Menu = (): ReactNode => {
console.debug("Rendering Menu.");

const {
value: isOpened,
setTrue: handleOpen,
Expand Down
2 changes: 2 additions & 0 deletions src/app/_services/get-definitions-sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ const getDefinitionDocumentsId = async (): Promise<Array<ObjectId>> => {
};

const getDefinitionsSample = async (): Promise<Array<Definition>> => {
console.debug("Calling getDefinitionsSample.");

const database: Db = await getDatabase();
const collection: Collection<WordDocument> = database.collection("words");

Expand Down
2 changes: 2 additions & 0 deletions src/app/api/words/reactions/get-reactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { safeInOperator } from "~/utils/api/aggregation/safe-in-operator";
import { safeSizeOperator } from "~/utils/api/aggregation/safe-size-operator";

export const getReactions = async (definitionIds: Array<string>, ip: string | undefined = ""): Promise<Array<Reactions>> => {
console.debug("Calling getReactions.");

const database: Db = await getDatabase();
const collection: Collection<WordDocument> = database.collection("words");

Expand Down
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { cachedGetDefinitionsSample } from "./_services/get-definitions-sample";
export const revalidate: number = 86400; // Revalidate every day.

const Page = async (): Promise<ReactElement> => {
console.debug("Rendering /.");

const words: Array<Definition> = await cachedGetDefinitionsSample();

return (
Expand Down
2 changes: 2 additions & 0 deletions src/components/definition/reactions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ interface Props {
}

export const Reactions = ({ definitionId }: Props): ReactNode => {
console.debug("Rendering Reactions.");

const {
likes,
isLiked,
Expand Down

0 comments on commit 4a9fc1e

Please sign in to comment.