Skip to content

Commit

Permalink
Added type for selectedProject useState
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjeevLakhwani committed Aug 19, 2024
1 parent 1194e93 commit d7a7c6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/components/ChooseProjectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | undefined>(
selectedScope.project ?? projects[0]?.identifier ?? undefined
);

const baseURL = '/' + location.pathname.split('/')[1];

Expand Down

0 comments on commit d7a7c6e

Please sign in to comment.