Skip to content

Commit 0a6476e

Browse files
Fix url issues
1 parent 88f4676 commit 0a6476e

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/App.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,31 @@ class App extends Component {
3030
<Switch>
3131
<Route
3232
exact
33-
path="/"
33+
path={process.env.PUBLIC_URL + "/"}
3434
render={() => (
3535
<CovidApp
3636
setDarkMode={this.setDarkMode}
3737
isDarkMode={this.state.isDarkMode}
3838
/>
3939
)}
4040
/>
41-
<Route exact path="/symptoms" render={() => <h1>symptoms</h1>} />
4241
<Route
4342
exact
44-
path="/stay-safe"
43+
path={process.env.PUBLIC_URL + "/symptoms"}
44+
render={() => <h1>symptoms</h1>}
45+
/>
46+
<Route
47+
exact
48+
path={process.env.PUBLIC_URL + "/stay-safe"}
4549
render={() => <h1>Stay Safe</h1>}
4650
/>
47-
<Route exact path="/help" render={() => <h1>Help Page</h1>} />
4851
<Route
49-
path="/"
52+
exact
53+
path={process.env.PUBLIC_URL + "/help"}
54+
render={() => <h1>Help Page</h1>}
55+
/>
56+
<Route
57+
path={process.env.PUBLIC_URL + "/"}
5058
render={() => (
5159
<CovidApp
5260
setDarkMode={this.setDarkMode}

0 commit comments

Comments
 (0)