forked from osbuild/image-builder-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRouter.tsx
More file actions
39 lines (36 loc) · 818 Bytes
/
Router.tsx
File metadata and controls
39 lines (36 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import React, { lazy, Suspense } from 'react';
import { Route, Routes } from 'react-router-dom';
const LandingPage = lazy(() => import('./Components/LandingPage/LandingPage'));
const ImportImageWizard = lazy(
() => import('./Components/CreateImageWizard/ImportImageWizard'),
);
export const Router = () => {
return (
<Routes>
<Route
path='*'
element={
<Suspense>
<LandingPage />
</Suspense>
}
/>
<Route
path='imagewizard/import'
element={
<Suspense>
<ImportImageWizard />
</Suspense>
}
/>
<Route
path='imagewizard/:composeId?'
element={
<Suspense>
<LandingPage />
</Suspense>
}
/>
</Routes>
);
};