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:
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
"styled-components": "^5.2.0",
|
"styled-components": "^5.2.0",
|
||||||
"typescript": "~3.7.2"
|
"typescript": "~3.7.2"
|
||||||
},
|
},
|
||||||
"homepage": "https://hazemkrimi.github.io/react-weather-app",
|
"homepage": "https://hazemkrimi.github.io/react-weather-app/home",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ const App: React.FC = () => {
|
|||||||
<Route path='/' exact>
|
<Route path='/' exact>
|
||||||
<Home />
|
<Home />
|
||||||
</Route>
|
</Route>
|
||||||
|
<Route path='/home' exact>
|
||||||
|
<Home />
|
||||||
|
</Route>
|
||||||
<Route path='/search/:query'>
|
<Route path='/search/:query'>
|
||||||
<Search />
|
<Search />
|
||||||
</Route>
|
</Route>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const NavBar: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Nav>
|
<Nav>
|
||||||
<h1 onClick={() => history.push('/')}>Weather</h1>
|
<h1 onClick={() => history.push('/home')}>Weather</h1>
|
||||||
<SearchBar />
|
<SearchBar />
|
||||||
</Nav>
|
</Nav>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user