fix header and redirect home
This commit is contained in:
parent
dfb34fd90d
commit
4501a40c29
2 changed files with 6 additions and 2 deletions
|
|
@ -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 (
|
||||
<>
|
||||
<Routes>
|
||||
<Route index element={<Welcome />} />
|
||||
<Route index element={<Navigate to="/home" />} />
|
||||
<Route path={"/login"} element={<LoginPage />} />
|
||||
<Route path={"/signup"} element={<SignUpPage />} />
|
||||
<Route path={"/invites/:invitationId"} element={<InviteSignUpForm />} />
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ export default function TopMenu() {
|
|||
const user = currentUser.user;
|
||||
const workspace = currentUser.workspace;
|
||||
|
||||
if (!user || !workspace) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Menu width={250} position="bottom-end" withArrow shadow={"lg"}>
|
||||
<Menu.Target>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue