set search query params

This commit is contained in:
andres alcocer
2021-10-08 11:27:08 -04:00
parent f6a828e243
commit 29a274048b
4 changed files with 163 additions and 155 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'
import Home from './pages/Home'
import NotFound from './pages/NotFound'
@@ -10,7 +10,8 @@ const AppRouter = () => (
<BrowserRouter>
<Navbar />
<Switch>
<Route path='/' exact component={Home} />
<Route path='/' exact render={() => <Redirect to='/browse' />} />
<Route path='/browse' component={Home} />
<Route path='/search' component={Search} />
<Route component={NotFound} />
</Switch>