From 067c2e7e6ef40e3486a61147e9f33cbfcd436ee8 Mon Sep 17 00:00:00 2001 From: devleejb Date: Sat, 3 Aug 2024 16:10:14 +0900 Subject: [PATCH 1/2] Fix checking conflict in note creation --- frontend/src/components/modals/CreateModal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/modals/CreateModal.tsx b/frontend/src/components/modals/CreateModal.tsx index 2942f85b..f8a1c86a 100644 --- a/frontend/src/components/modals/CreateModal.tsx +++ b/frontend/src/components/modals/CreateModal.tsx @@ -31,6 +31,8 @@ function CreateModal(props: CreateModalProps) { const { data: conflictResult } = useCheckNameConflictQuery(debouncedNickname); const errorMessage = useMemo(() => { + if (!enableConflictCheck) return null; + if (nickname.length < 2) { return "Title must be at least 2 characters"; } @@ -38,7 +40,7 @@ function CreateModal(props: CreateModalProps) { return "Already Exists"; } return null; - }, [nickname.length, conflictResult?.conflict]); + }, [enableConflictCheck, nickname.length, conflictResult?.conflict]); useDebounce( () => { From 3f1e00ab4713d9dbb1da387445f2ac555affe651 Mon Sep 17 00:00:00 2001 From: devleejb Date: Sat, 3 Aug 2024 16:13:11 +0900 Subject: [PATCH 2/2] Remove unused `console.log` --- backend/src/workspaces/workspaces.controller.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/src/workspaces/workspaces.controller.ts b/backend/src/workspaces/workspaces.controller.ts index 7aa9957c..a3df789d 100644 --- a/backend/src/workspaces/workspaces.controller.ts +++ b/backend/src/workspaces/workspaces.controller.ts @@ -68,7 +68,6 @@ export class WorkspacesController { @Req() req: AuthroizedRequest, @Param("workspace_slug") workspaceSlug: string ): Promise { - console.log(encodeURI(workspaceSlug)); return this.workspacesService.findOneBySlug(req.user.id, encodeURI(workspaceSlug)); }