This also mitigates the issue where clicking the image-builder nav link would redirect you to `image-builder/image-builder` if image-builder was already opened. And `/` didn't catch that path.
14 lines
492 B
JavaScript
14 lines
492 B
JavaScript
import React, { lazy } from 'react';
|
|
import { Route, Routes } from 'react-router-dom';
|
|
|
|
const LandingPage = lazy(() => import('./Components/LandingPage/LandingPage'));
|
|
const CreateImageWizard = lazy(() => import('./Components/CreateImageWizard/CreateImageWizard'));
|
|
|
|
export const Router = () => {
|
|
return (
|
|
<Routes>
|
|
<Route path='/imagewizard/*' element={ <CreateImageWizard /> } />
|
|
<Route path='*' element={ <LandingPage /> } />
|
|
</Routes>
|
|
);
|
|
};
|