From 864269f37b01ecf2868476458a936ee73b619373 Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Fri, 25 Nov 2022 11:50:03 +0530 Subject: [PATCH] Not opening template picker if there are no boards --- webapp/src/components/workspace.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/workspace.tsx b/webapp/src/components/workspace.tsx index 9e3579cb3..909e96181 100644 --- a/webapp/src/components/workspace.tsx +++ b/webapp/src/components/workspace.tsx @@ -163,8 +163,10 @@ const Workspace = (props: Props) => { setBoardTemplateSelectorOpen(false) }, []) const openBoardTemplateSelector = useCallback(() => { - setBoardTemplateSelectorOpen(true) - }, []) + if (board) { + setBoardTemplateSelectorOpen(true) + } + }, [board]) useEffect(() => { setBoardTemplateSelectorOpen(false) }, [board, viewId])