diff --git a/apps/client/src/App.tsx b/apps/client/src/App.tsx index e9ea50c..307e60f 100644 --- a/apps/client/src/App.tsx +++ b/apps/client/src/App.tsx @@ -1,4 +1,4 @@ -import { Route, Routes } from "react-router-dom"; +import { Navigate, Route, Routes } from "react-router-dom"; import { Welcome } from "@/pages/welcome"; import SignUpPage from "@/pages/auth/signup"; import LoginPage from "@/pages/auth/login"; @@ -59,7 +59,7 @@ export default function App() { return ( <> - } /> + } /> } /> } /> } /> diff --git a/apps/client/src/components/layouts/global/top-menu.tsx b/apps/client/src/components/layouts/global/top-menu.tsx index 5d3ea7e..5eade7d 100644 --- a/apps/client/src/components/layouts/global/top-menu.tsx +++ b/apps/client/src/components/layouts/global/top-menu.tsx @@ -20,6 +20,10 @@ export default function TopMenu() { const user = currentUser.user; const workspace = currentUser.workspace; + if (!user || !workspace) { + return <>; + } + return (