diff --git a/QandA/frontend/src/App.tsx b/QandA/frontend/src/App.tsx index 511f2ac..46976eb 100644 --- a/QandA/frontend/src/App.tsx +++ b/QandA/frontend/src/App.tsx @@ -7,12 +7,13 @@ import { BrowserRouter, Routes, Route } from 'react-router-dom'; import { Header } from './Header'; import { HomePage } from './HomePage'; import { fontFamily, fontSize, gray2 } from './Styles'; -import { AskPage } from './AskPage'; import { SearchPage } from './SearchPage'; import { SignInPage } from './SignInPage'; import { NotFoundPage } from './NotFoundPage'; import { QuestionPage } from './QuestionPage'; +const AskPage = React.lazy(() => import('./AskPage')); + function App() { return ( @@ -27,7 +28,25 @@ function App() { } /> } /> - } /> + + Loading... + + } + > + + + } + /> } /> } /> } /> diff --git a/QandA/frontend/src/AskPage.tsx b/QandA/frontend/src/AskPage.tsx index 75b77bc..6b6e88c 100644 --- a/QandA/frontend/src/AskPage.tsx +++ b/QandA/frontend/src/AskPage.tsx @@ -2,3 +2,5 @@ import React from 'react'; import { Page } from './Page'; export const AskPage = () => {null}; + +export default AskPage;