Fix inaccessible invite page / reset page / verify page when logged in.

This commit is contained in:
Paul 2021-09-13 17:22:17 +01:00
parent 52875ab197
commit 45c7cd0307

View file

@ -8,6 +8,8 @@ import { CheckAuth } from "../context/revoltjs/CheckAuth";
import Masks from "../components/ui/Masks"; import Masks from "../components/ui/Masks";
import Preloader from "../components/ui/Preloader"; import Preloader from "../components/ui/Preloader";
import Invite from "./invite/Invite";
const Login = lazy(() => import("./login/Login")); const Login = lazy(() => import("./login/Login"));
const RevoltApp = lazy(() => import("./RevoltApp")); const RevoltApp = lazy(() => import("./RevoltApp"));
@ -19,6 +21,15 @@ export function App() {
// @ts-expect-error typings mis-match between preact... and preact? */} // @ts-expect-error typings mis-match between preact... and preact? */}
<Suspense fallback={<Preloader type="spinner" />}> <Suspense fallback={<Preloader type="spinner" />}>
<Switch> <Switch>
<Route path="/login/verify/:token">
<Login />
</Route>
<Route path="/login/reset/:token">
<Login />
</Route>
<Route path="/invite/:code">
<Invite />
</Route>
<Route path="/login"> <Route path="/login">
<CheckAuth> <CheckAuth>
<Login /> <Login />