refactor: guest mode

This commit is contained in:
Tristan Yang
2022-09-02 12:39:40 +08:00
parent 333cbb8b4b
commit c4435662c0
8 changed files with 50 additions and 26 deletions
+3
View File
@@ -26,6 +26,7 @@ import HomePage from "./home";
import ChatPage from "./chat";
import Loading from "../common/component/Loading";
import store, { useAppSelector } from "../app/store";
import GuestLogining from "./guest";
let toastId: string;
const PageRoutes = () => {
const {
@@ -48,6 +49,7 @@ const PageRoutes = () => {
<HashRouter>
<Suspense fallback={<Loading fullscreen={true} />}>
<Routes>
<Route path="/guest_login" element={<GuestLogining />} />
<Route path="/oauth/:token" element={<OAuthPage />} />
<Route
path="/login"
@@ -91,6 +93,7 @@ const PageRoutes = () => {
<Route path="/onboarding" element={<OnboardingPage />} />
<Route
key={"main"}
path="/"
element={
<RequireAuth>