mirror of
https://github.com/hazemKrimi/react-weather-app.git
synced 2026-05-01 18:30:25 +00:00
Update routes
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@
|
||||
"styled-components": "^5.2.0",
|
||||
"typescript": "~3.7.2"
|
||||
},
|
||||
"homepage": "https://hazemkrimi.github.io/react-weather-app",
|
||||
"homepage": "https://hazemkrimi.github.io/react-weather-app/home",
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
|
||||
@@ -20,6 +20,9 @@ const App: React.FC = () => {
|
||||
<Route path='/' exact>
|
||||
<Home />
|
||||
</Route>
|
||||
<Route path='/home' exact>
|
||||
<Home />
|
||||
</Route>
|
||||
<Route path='/search/:query'>
|
||||
<Search />
|
||||
</Route>
|
||||
|
||||
@@ -20,7 +20,7 @@ const NavBar: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Nav>
|
||||
<h1 onClick={() => history.push('/')}>Weather</h1>
|
||||
<h1 onClick={() => history.push('/home')}>Weather</h1>
|
||||
<SearchBar />
|
||||
</Nav>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user