Skip to content

Commit

Permalink
update routes for newLanding
Browse files Browse the repository at this point in the history
  • Loading branch information
Ledchig committed Feb 9, 2024
1 parent a1eeace commit 51c3c0b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions frontend/src/AppRoutes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down Expand Up @@ -53,8 +55,9 @@ function AppRoutes() {
<Suspense fallback={<DefaultLoader />}>
<ScrollToTop />
<Routes>
<Route path="/" element={<Landing />} />
<Route path={routes.newLandingPath()} element={<NewLanding />} />
<Route element={<Layout />}>
<Route index element={<Landing />} />
<Route path={routes.homePagePath()} element={<SnippetPage />} />
<Route path={routes.snippetPagePath()} element={<SnippetPage />} />
<Route path={routes.aboutPagePath()} element={<AboutPage />} />
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/landing/Landing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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();

Expand Down Expand Up @@ -497,4 +497,4 @@ function Landing() {
);
}

export default Landing;
export default NewLanding;
1 change: 1 addition & 0 deletions frontend/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default {
// OAuth
oAuthPath: () => [apiPath, 'oauth'].join('/'),

newLandingPath: () => '/landing',
homePagePath: () => '/editor',
aboutPagePath: () => '/about',
profilePagePath: (username = ':username') => `/u/${username}`,
Expand Down

0 comments on commit 51c3c0b

Please sign in to comment.