debian-image-builder-frontend/src/Router.js
Sanne Raymaekers 6567323ef6 Router: Replace landing with catch-all route
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.
2021-11-30 16:12:43 +01:00

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>
);
};