From d7a7c6e1539e43bb50b62d3723ae85e1aacf9e7e Mon Sep 17 00:00:00 2001 From: Sanjeev Lakhwani Date: Mon, 19 Aug 2024 12:01:51 -0400 Subject: [PATCH] Added type for selectedProject useState --- src/js/components/ChooseProjectModal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/components/ChooseProjectModal.tsx b/src/js/components/ChooseProjectModal.tsx index a90dfc53..bc0f49a9 100644 --- a/src/js/components/ChooseProjectModal.tsx +++ b/src/js/components/ChooseProjectModal.tsx @@ -9,7 +9,9 @@ const ChooseProjectModal = ({ isModalOpen, setIsModalOpen }: ChooseProjectModalP const t = useTranslationCustom(); const location = useLocation(); const { projects, selectedScope } = useAppSelector((state) => state.metadata); - const [selectedProject, setSelectedProject] = useState(selectedScope.project ?? projects[0]?.identifier ?? null); + const [selectedProject, setSelectedProject] = useState( + selectedScope.project ?? projects[0]?.identifier ?? undefined + ); const baseURL = '/' + location.pathname.split('/')[1];