Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit a69ea70

Browse files
Fix scrolling issues when going to different pages (#164)
1 parent 22afd45 commit a69ea70

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

src/Routes.js

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,55 @@ const renderRoutes = () => (
3838
</>
3939
)}
4040
/>
41+
<Route
42+
path="/courses"
43+
render={props => (
44+
<t>
45+
<ScrollReset />
46+
<MainLayout>
47+
<CoursesView {...props} />
48+
</MainLayout>
49+
</t>
50+
)}
51+
/>
52+
<Route
53+
path="/events"
54+
exact
55+
render={props => (
56+
<MainLayout>
57+
<ScrollReset />
58+
<EventsView {...props} />
59+
</MainLayout>
60+
)}
61+
/>
4162

4263
<Route
43-
path="/applications"
64+
path="/campusLeaders"
4465
exact
66+
render={props => (
67+
<span>
68+
<MainLayout>
69+
<CAView {...props} />
70+
</MainLayout>
71+
</span>
72+
)}
73+
/>
74+
75+
<Route
76+
path="/bootcamp"
4577
render={props => (
4678
<MainLayout>
47-
<ApplicationsView {...props} />
79+
<Bootcamps {...props} />
4880
</MainLayout>
4981
)}
5082
/>
5183

5284
<Route
53-
path="/events"
85+
path="/applications"
5486
exact
5587
render={props => (
5688
<MainLayout>
57-
<ScrollReset />
58-
<EventsView {...props} />
89+
<ApplicationsView {...props} />
5990
</MainLayout>
6091
)}
6192
/>
@@ -109,38 +140,6 @@ const renderRoutes = () => (
109140
)}
110141
/>
111142

112-
<Route
113-
path="/courses"
114-
render={props => (
115-
<>
116-
<ScrollReset />
117-
<MainLayout>
118-
<CoursesView {...props} />
119-
</MainLayout>
120-
</>
121-
)}
122-
/>
123-
124-
<Route
125-
path="/bootcamp"
126-
render={props => (
127-
<MainLayout>
128-
<Bootcamps {...props} />
129-
</MainLayout>
130-
)}
131-
/>
132-
133-
<Route
134-
path="/campusLeaders"
135-
exact
136-
render={props => (
137-
<MainLayout>
138-
<ScrollReset />
139-
<CAView {...props} />
140-
</MainLayout>
141-
)}
142-
/>
143-
144143
<Route
145144
path={`/machine-learning-using-python`}
146145
exact

0 commit comments

Comments
 (0)