From 56146a7d998791791b719924f53fc46a0bffbfe0 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sun, 11 Jun 2023 15:08:18 -0500 Subject: [PATCH] dynamic imports --- src/App.tsx | 38 +++++++++++++++++++++++------------- src/lib/ConfirmQuitModal.tsx | 7 ++++++- src/panes/KanjiPane.tsx | 4 +++- src/panes/SettingsPane.tsx | 4 +++- src/panes/SrsPane.tsx | 4 +++- src/panes/SrsReviewPane.tsx | 4 +++- src/panes/VocabPane.tsx | 4 +++- 7 files changed, 45 insertions(+), 20 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index dc77e4e..d129321 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,16 +1,11 @@ import { Link, RouterProvider, createHashRouter } from "react-router-dom"; -import KanjiPane from "./panes/KanjiPane"; import classNames from "classnames"; import { ChakraProvider, Flex } from "@chakra-ui/react"; import { createBrowserRouter } from "react-router-dom"; import { Outlet, Route, createRoutesFromElements, matchPath, useLocation } from "react-router"; -import SrsPane from "./panes/SrsPane"; -import VocabPane from "./panes/VocabPane"; -import SettingsPane from "./panes/SettingsPane"; import { StrictMode } from "react"; import styles from "./App.module.scss"; -import SrsReviewPane from "./panes/SrsReviewPane"; function Layout() { const location = useLocation(); @@ -18,7 +13,7 @@ function Layout() { return (