Skip to content

Commit 0e79f1e

Browse files
fix routing
1 parent 837ccd9 commit 0e79f1e

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

packages/frontend/src/App.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
import React from 'react'
2-
import styles from './App.module.css'
3-
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
4-
import { AppBar } from '@clubhub/components'
5-
import {
6-
HomePage,
7-
ClubPage,
8-
NotFoundPage,
9-
LoginPage,
10-
RegisterPage,
11-
SettingPage,
12-
SearchClubPage
13-
} from './pages'
1+
import React from 'react';
2+
import styles from './App.module.css';
3+
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
4+
// import { AppBar } from '@clubhub/components';
5+
import {
6+
HomePage,
7+
ClubPage,
8+
NotFoundPage,
9+
LoginPage,
10+
RegisterPage,
11+
SettingPage,
12+
SearchClubPage
13+
} from './pages';
1414

1515
const App = () => {
16-
return (
17-
<div className={styles.root}>
18-
<Router>
19-
<AppBar />
20-
<Switch>
21-
<Route exact path="/" component={HomePage} />
22-
<Route path="/club/" component={SearchClubPage}/>
23-
<Route path="/club/:id" component={ClubPage} />
24-
<Route path="/login" component={LoginPage} />
25-
<Route path="/register" component={RegisterPage} />
26-
<Route path="/setting" component={SettingPage} />
27-
<Route path="*" component={NotFoundPage} />
28-
</Switch>
29-
</Router>
30-
</div>
31-
)
32-
}
16+
return (
17+
<div className={styles.root}>
18+
<Router>
19+
{/* <AppBar /> */}
20+
<Switch>
21+
<Route exact path='/' component={HomePage} />
22+
<Route path='/club/:id' component={ClubPage} />
23+
<Route exact path='/club/' component={SearchClubPage} />
24+
<Route path='/login' component={LoginPage} />
25+
<Route path='/register' component={RegisterPage} />
26+
<Route path='/setting' component={SettingPage} />
27+
<Route path='*' component={NotFoundPage} />
28+
</Switch>
29+
</Router>
30+
</div>
31+
);
32+
};
3333

34-
export default App
34+
export default App;

0 commit comments

Comments
 (0)