Skip to content

Commit 172e196

Browse files
authored
Replace Switch with Routes in Main component
1 parent 57f8a6c commit 172e196

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

web/src/Main.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react';
2-
import {Switch, Route} from 'react-router-dom';
2+
import {Routes, Route} from 'react-router-dom';
33
import './App.css';
44
import Home from './Home/Home';
55
import Simulation from './Simulation/Simulation';
66

77
const Main = () => (
88
<main>
9-
<Switch>
10-
<Route exact path='/' component={Home}/>
11-
<Route path='/simulation/:id' component={Simulation}/>
12-
</Switch>
9+
<Routes>
10+
<Route path='/' element={<Home />}/>
11+
<Route path='/simulation/:id' element={<Simulation />}/>
12+
</Routes>
1313
</main>
1414
)
1515

16-
export default Main;
16+
export default Main;

0 commit comments

Comments
 (0)