diff --git a/frontend/src/AppRoutes.jsx b/frontend/src/AppRoutes.jsx index 4e915e19..44f3ef2f 100644 --- a/frontend/src/AppRoutes.jsx +++ b/frontend/src/AppRoutes.jsx @@ -11,13 +11,15 @@ import ScrollToTop from './utils/scrollToTop.js'; import DefaultLoader from './components/Loaders/DefaultLoader.jsx'; +const Landing = lazy(() => import('./pages/landing')); +const NewLanding = lazy(() => import('./landing/Landing.jsx')); + const ProfilePage = lazy(() => import('./pages/profile')); const SettingsPage = lazy(() => import('./pages/settings')); const SnippetPage = lazy(() => import('./pages/snippet')); const AboutPage = lazy(() => import('./pages/about')); const SignUpPage = lazy(() => import('./pages/signup')); const SignInPage = lazy(() => import('./pages/signin')); -const Landing = lazy(() => import('./landing/Landing')); const LicenseAgreement = lazy(() => import('./pages/license-agreement')); const ForgotPasswordPage = lazy(() => import('./pages/forgot-password')); const ResetPasswordPage = lazy(() => import('./pages/reset-password')); @@ -53,8 +55,9 @@ function AppRoutes() { }> - } /> + } /> }> + } /> } /> } /> } /> diff --git a/frontend/src/landing/Landing.jsx b/frontend/src/landing/Landing.jsx index c3403d3a..575b30fd 100644 --- a/frontend/src/landing/Landing.jsx +++ b/frontend/src/landing/Landing.jsx @@ -2,7 +2,7 @@ import { Link } from 'react-router-dom'; import { Button, Col, Container, Image, Row } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; import { useEffect, useRef } from 'react'; -import routes from '../routes'; +import routes from '../routes.js'; import Faq from './Faq.jsx'; import Header from './Header.jsx'; import Footer from './Footer.jsx'; @@ -22,7 +22,7 @@ import TeamWork from './assets/Icons=TeamWork.svg'; import Template from './assets/Icons=Template.svg'; import ImageUnderCarousel from './assets/ReadyAssets.jpeg'; -function Landing() { +function NewLanding() { const { t } = useTranslation(); const advantagesRef = useRef(); @@ -497,4 +497,4 @@ function Landing() { ); } -export default Landing; +export default NewLanding; diff --git a/frontend/src/routes.js b/frontend/src/routes.js index cdcb9204..8d3569ef 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -48,6 +48,7 @@ export default { // OAuth oAuthPath: () => [apiPath, 'oauth'].join('/'), + newLandingPath: () => '/landing', homePagePath: () => '/editor', aboutPagePath: () => '/about', profilePagePath: (username = ':username') => `/u/${username}`,