Skip to content

Commit d800fc0

Browse files
authored
Merge pull request #30 from chiss2906/Routing
Routing
2 parents 14e84ed + 04e1406 commit d800fc0

8 files changed

Lines changed: 16 additions & 24 deletions

File tree

01-Login/src/history.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import createHistory from 'history/createBrowserHistory'
22

3-
export default createHistory({
4-
forceRefresh: true
5-
})
3+
export default createHistory()

01-Login/src/routes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Route, BrowserRouter } from 'react-router-dom';
2+
import { Route, Router } from 'react-router-dom';
33
import App from './App';
44
import Home from './Home/Home';
55
import Callback from './Callback/Callback';
@@ -16,7 +16,7 @@ const handleAuthentication = (nextState, replace) => {
1616

1717
export const makeMainRoutes = () => {
1818
return (
19-
<BrowserRouter history={history} component={App}>
19+
<Router history={history} component={App}>
2020
<div>
2121
<Route path="/" render={(props) => <App auth={auth} {...props} />} />
2222
<Route path="/home" render={(props) => <Home auth={auth} {...props} />} />
@@ -25,6 +25,6 @@ export const makeMainRoutes = () => {
2525
return <Callback {...props} />
2626
}}/>
2727
</div>
28-
</BrowserRouter>
28+
</Router>
2929
);
3030
}

02-User-Profile/src/history.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import createHistory from 'history/createBrowserHistory'
22

3-
export default createHistory({
4-
forceRefresh: true
5-
})
3+
export default createHistory()

02-User-Profile/src/routes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Redirect, Route, BrowserRouter } from 'react-router-dom';
2+
import { Redirect, Route, Router } from 'react-router-dom';
33
import App from './App';
44
import Home from './Home/Home';
55
import Profile from './Profile/Profile';
@@ -17,7 +17,7 @@ const handleAuthentication = (nextState, replace) => {
1717

1818
export const makeMainRoutes = () => {
1919
return (
20-
<BrowserRouter history={history} component={App}>
20+
<Router history={history} component={App}>
2121
<div>
2222
<Route path="/" render={(props) => <App auth={auth} {...props} />} />
2323
<Route path="/home" render={(props) => <Home auth={auth} {...props} />} />
@@ -33,6 +33,6 @@ export const makeMainRoutes = () => {
3333
return <Callback {...props} />
3434
}}/>
3535
</div>
36-
</BrowserRouter>
36+
</Router>
3737
);
3838
}

03-Calling-an-API/src/history.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import createHistory from 'history/createBrowserHistory'
22

3-
export default createHistory({
4-
forceRefresh: true
5-
})
3+
export default createHistory()

03-Calling-an-API/src/routes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Redirect, Route, BrowserRouter } from 'react-router-dom';
2+
import { Redirect, Route, Router } from 'react-router-dom';
33
import App from './App';
44
import Home from './Home/Home';
55
import Profile from './Profile/Profile';
@@ -18,7 +18,7 @@ const handleAuthentication = (nextState, replace) => {
1818

1919
export const makeMainRoutes = () => {
2020
return (
21-
<BrowserRouter history={history} component={App}>
21+
<Router history={history} component={App}>
2222
<div>
2323
<Route path="/" render={(props) => <App auth={auth} {...props} />} />
2424
<Route path="/home" render={(props) => <Home auth={auth} {...props} />} />
@@ -41,6 +41,6 @@ export const makeMainRoutes = () => {
4141
return <Callback {...props} />
4242
}}/>
4343
</div>
44-
</BrowserRouter>
44+
</Router>
4545
);
4646
}

04-Authorization/src/history.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import createHistory from 'history/createBrowserHistory'
22

3-
export default createHistory({
4-
forceRefresh: true
5-
})
3+
export default createHistory()

04-Authorization/src/routes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Redirect, Route, BrowserRouter } from 'react-router-dom';
2+
import { Redirect, Route, Router } from 'react-router-dom';
33
import App from './App';
44
import Home from './Home/Home';
55
import Profile from './Profile/Profile';
@@ -19,7 +19,7 @@ const handleAuthentication = (nextState, replace) => {
1919

2020
export const makeMainRoutes = () => {
2121
return (
22-
<BrowserRouter history={history} component={App}>
22+
<Router history={history} component={App}>
2323
<div>
2424
<Route path="/" render={(props) => <App auth={auth} {...props} />} />
2525
<Route path="/home" render={(props) => <Home auth={auth} {...props} />} />
@@ -49,6 +49,6 @@ export const makeMainRoutes = () => {
4949
return <Callback {...props} />
5050
}}/>
5151
</div>
52-
</BrowserRouter>
52+
</Router>
5353
);
5454
}

0 commit comments

Comments
 (0)