mirror of
https://github.com/hazemKrimi/react-weather-app.git
synced 2026-05-02 02:30:30 +00:00
Update routes
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Switch, Route } from 'react-router-dom';
|
import { Switch, Route, Redirect } from 'react-router-dom';
|
||||||
import Home from './pages/Home';
|
import Home from './pages/Home';
|
||||||
import Search from './pages/Search';
|
import Search from './pages/Search';
|
||||||
import NotFound from './pages/NotFound';
|
import NotFound from './pages/NotFound';
|
||||||
@@ -27,7 +27,7 @@ const App: React.FC = () => {
|
|||||||
<Search />
|
<Search />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path='/search'>
|
<Route path='/search'>
|
||||||
<Search />
|
<Redirect to='/home' />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path='*' exact>
|
<Route path='*' exact>
|
||||||
<NotFound />
|
<NotFound />
|
||||||
|
|||||||
Reference in New Issue
Block a user