Archived
fix: cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { lazy, Suspense, useState } from "react";
|
||||
import React, { lazy, Suspense } from "react";
|
||||
import { BrowserRouter, Navigate, Route, Routes, useParams } from "react-router-dom";
|
||||
import { AuthProvider, useAuth } from "./context/AuthContext";
|
||||
import { I18nProvider } from "./i18n/I18nProvider";
|
||||
@@ -13,14 +13,7 @@ const SettingsPage = lazy(() => import("./pages/Settings").then((m) => ({ defaul
|
||||
const BookmarksNotesPage = lazy(() => import("./components/annotations/BookmarksNotesPage").then((m) => ({ default: m.BookmarksNotesPage })));
|
||||
const ReadingPage = lazy(() => import("./pages/ReadingPage").then((m) => ({ default: m.default })));
|
||||
|
||||
const AuthPage = lazy(() =>
|
||||
import("./pages/AuthPage").then((m) => ({
|
||||
default: () => {
|
||||
const [isLogin, setIsLogin] = useState(true);
|
||||
return isLogin ? <m.LoginPage onToggle={() => setIsLogin(false)} /> : <m.RegisterPage onToggle={() => setIsLogin(true)} />;
|
||||
},
|
||||
})),
|
||||
);
|
||||
const AuthPage = lazy(() => import("./pages/AuthPage"));
|
||||
|
||||
function LoadingFallback() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
Reference in New Issue
Block a user