mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-13 16:22:32 +10:00
fix header and redirect home
This commit is contained in:
@ -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 { Welcome } from "@/pages/welcome";
|
||||||
import SignUpPage from "@/pages/auth/signup";
|
import SignUpPage from "@/pages/auth/signup";
|
||||||
import LoginPage from "@/pages/auth/login";
|
import LoginPage from "@/pages/auth/login";
|
||||||
@ -59,7 +59,7 @@ export default function App() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route index element={<Welcome />} />
|
<Route index element={<Navigate to="/home" />} />
|
||||||
<Route path={"/login"} element={<LoginPage />} />
|
<Route path={"/login"} element={<LoginPage />} />
|
||||||
<Route path={"/signup"} element={<SignUpPage />} />
|
<Route path={"/signup"} element={<SignUpPage />} />
|
||||||
<Route path={"/invites/:invitationId"} element={<InviteSignUpForm />} />
|
<Route path={"/invites/:invitationId"} element={<InviteSignUpForm />} />
|
||||||
|
|||||||
@ -20,6 +20,10 @@ export default function TopMenu() {
|
|||||||
const user = currentUser.user;
|
const user = currentUser.user;
|
||||||
const workspace = currentUser.workspace;
|
const workspace = currentUser.workspace;
|
||||||
|
|
||||||
|
if (!user || !workspace) {
|
||||||
|
return <></>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu width={250} position="bottom-end" withArrow shadow={"lg"}>
|
<Menu width={250} position="bottom-end" withArrow shadow={"lg"}>
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
|
|||||||
Reference in New Issue
Block a user