diff --git a/apps/platform/src/app/(main)/page.tsx b/apps/platform/src/app/(main)/page.tsx index 94c3515b..58539509 100644 --- a/apps/platform/src/app/(main)/page.tsx +++ b/apps/platform/src/app/(main)/page.tsx @@ -56,9 +56,12 @@ export default function Index(): JSX.Element { const router = useRouter() - const currentWorkspace = JSON.parse( - localStorage.getItem('currentWorkspace') ?? '{}' - ) as Workspace + const currentWorkspace = + typeof localStorage !== 'undefined' + ? (JSON.parse( + localStorage.getItem('currentWorkspace') ?? '{}' + ) as Workspace) + : (JSON.parse(`{}`) as Workspace) useEffect(() => { Projects.getProjectsbyWorkspaceID(currentWorkspace.id) diff --git a/apps/platform/src/app/(main)/project/[project]/@secret/page.tsx b/apps/platform/src/app/(main)/project/[project]/@secret/page.tsx index fca52e8e..8919cbf7 100644 --- a/apps/platform/src/app/(main)/project/[project]/@secret/page.tsx +++ b/apps/platform/src/app/(main)/project/[project]/@secret/page.tsx @@ -53,7 +53,7 @@ function SecretPage(): React.JSX.Element { collapsible type="single" > - {allSecrets.map((secret) => { + {allSecrets?.map((secret) => { return (
-
{currentProject.name}
+
{currentProject?.name}