File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ function App() {
9
9
< BrowserRouter >
10
10
< Routes >
11
11
< Route path = "/" element = { < Layout /> } >
12
- < Route path = "/questions" element = { < > question page list</ > } />
13
- < Route path = "/questions/new" element = { < NewQuestion /> } />
14
- < Route path = "/questions/:questionId" element = { < QuestionDetail /> } />
12
+ < Route path = "questions" >
13
+ < Route index element = { < > question page list</ > } />
14
+ < Route path = "new" element = { < NewQuestion /> } />
15
+ < Route path = ":questionId" element = { < QuestionDetail /> } />
16
+ </ Route >
15
17
< Route path = "*" element = { < PageNotFound /> } />
16
18
</ Route >
17
19
</ Routes >
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type NavbarItem = { label: string; link: string };
9
9
type NavbarProps = { navbarItems ?: Array < NavbarItem > } ;
10
10
11
11
const Navbar : FunctionComponent < NavbarProps > = ( props : NavbarProps ) => {
12
- const { navbarItems = [ { label : "Questions" , link : "/" } ] } = props ;
12
+ const { navbarItems = [ { label : "Questions" , link : "/questions " } ] } = props ;
13
13
const navigate = useNavigate ( ) ;
14
14
15
15
return (
You can’t perform that action at this time.
0 commit comments