From 0f7ed023cb36173dc6da1639e10ef7e2bea32e06 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 28 Jan 2024 19:51:35 +0100 Subject: [PATCH] lazy loading --- src/Components/AppRoutes/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Components/AppRoutes/index.js b/src/Components/AppRoutes/index.js index d5b8366..c4d1a12 100644 --- a/src/Components/AppRoutes/index.js +++ b/src/Components/AppRoutes/index.js @@ -2,11 +2,10 @@ import { Navigate, Route, Routes } from "react-router-dom"; import { Constants, isDevelopmentEnv } from "../../utils"; import { lazy } from "react"; import { MySupsenseFallback } from "../MySupsenseFallback"; -import Authentication, { - AuthenticationMethod, -} from "../../Pages/Authentication"; +import { AuthenticationMethod } from "../../Pages/Authentication"; // Lazy-loaded components +const Authentication = lazy(() => import("../../Pages/Authentication")); const Dashboard = lazy(() => import("../../Pages/Dashboard")); const PageNotFound = lazy(() => import("../../Pages/PageNotFound")); const PageInDevelopment = lazy(() => import("../../Pages/PageInDevelopment"));