1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
- import { BrowserRouter as Router , Route , Switch , useParams } from 'react-router-dom' ;
3
+ import { BrowserRouter , Route , Switch , useParams } from 'react-router-dom' ;
4
4
import { Suspense } from 'react' ;
5
5
import loadable from '@loadable/component' ;
6
6
import 'bootstrap/dist/css/bootstrap.min.css' ;
@@ -19,7 +19,7 @@ const Footer = loadable(() => import('./components/reused/Footer'));
19
19
class Main extends React . Component {
20
20
render ( ) {
21
21
return (
22
- < Router >
22
+ < BrowserRouter >
23
23
< div id = "main-wrapper" >
24
24
< header id = "header" >
25
25
< NavbarTop fallback = { < Loading /> } />
@@ -31,13 +31,13 @@ class Main extends React.Component {
31
31
< Route path = "/flights" component = { ContentFlights } />
32
32
< Route path = "/hotels" component = { ContentHotels } />
33
33
< Route path = "/trains" component = { ContentTrains } />
34
- < Route path = "/:id" children = { < Child /> } />
34
+ < Route path = "/:id" children = { < Child /> } />
35
35
</ Switch >
36
36
</ div >
37
37
</ Suspense >
38
38
< Footer />
39
39
</ div >
40
- </ Router >
40
+ </ BrowserRouter >
41
41
) ;
42
42
}
43
43
}
@@ -51,17 +51,12 @@ function Child () {
51
51
position : "cover"
52
52
} ;
53
53
54
- let icon = {
55
- src :`url(${ icon404 } )`
56
- } ;
57
-
58
-
59
- return (
54
+ return (
60
55
< div className = "section" style = { bg404 } background-size = "contain" >
61
56
< div className = "container" >
62
57
< div className = "row align-items-center p-3" >
63
58
< div className = "col text-center" >
64
- < img src = { icon404 } > </ img >
59
+ < img src = { icon404 } > </ img > >
65
60
< h3 > WHOOPS!</ h3 >
66
61
Looks like something's broken here.< br > </ br >
67
62
The page you were looking for could not be found.< br > </ br >
0 commit comments