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

Commit 6ec2fba

Browse files
committed
Revert url change in courses to match current need
1 parent c5c4f6f commit 6ec2fba

File tree

10 files changed

+141
-119
lines changed

10 files changed

+141
-119
lines changed

src/Routes.js

Lines changed: 119 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -6,83 +6,135 @@ import HomeView from 'src/views/pages/HomeView';
66
import CAView from 'src/views/pages/CLView';
77
import EventsView from 'src/views/pages/EventsView';
88
import LoadingScreen from 'src/components/LoadingScreen';
9-
import Courses from 'src/views/pages/Courses';
109
import CoursesView from 'src/views/pages/CoursesView';
1110
import ProfileView from 'src/views/pages/ProfileView';
1211
import ApplicationsView from 'src/views/pages/ApplicationsView';
1312

14-
const renderRoutes = () =>
13+
import MachineLearningView from 'src/views/pages/Courses/MachineLearningView';
14+
import AlgoJavaView from 'src/views/pages/Courses/AlgoJavaView';
15+
import AlgoPythonView from 'src/views/pages/Courses/AlgoPythonView';
16+
import WebFullStakView from 'src/views/pages/Courses/WebFullStakView';
17+
import CompetitiveJavaView from 'src/views/pages/Courses/CompetitiveJavaView';
18+
import PythonDevelopmentView from 'src/views/pages/Courses/PythonDevelopmentView';
1519

16-
<Suspense fallback={<LoadingScreen />}>
17-
<Switch>
18-
<Route
19-
path="/"
20-
exact
21-
render={props => (
22-
<MainLayout>
23-
<HomeView {...props} />
24-
</MainLayout>
25-
)}
26-
/>
20+
const renderRoutes = () => (
21+
<Suspense fallback={<LoadingScreen />}>
22+
<Switch>
23+
<Route
24+
path="/"
25+
exact
26+
render={props => (
27+
<MainLayout>
28+
<HomeView {...props} />
29+
</MainLayout>
30+
)}
31+
/>
2732

28-
<Route
29-
path="/applications"
30-
exact
31-
render={props => (
32-
<MainLayout>
33-
<ApplicationsView {...props} />
34-
</MainLayout>
35-
)}
36-
/>
33+
<Route
34+
path="/applications"
35+
exact
36+
render={props => (
37+
<MainLayout>
38+
<ApplicationsView {...props} />
39+
</MainLayout>
40+
)}
41+
/>
3742

38-
<Route
39-
path="/events"
40-
exact
41-
render={props => (
42-
<MainLayout>
43-
<EventsView {...props} />
44-
</MainLayout>
45-
)}
46-
/>
43+
<Route
44+
path="/events"
45+
exact
46+
render={props => (
47+
<MainLayout>
48+
<EventsView {...props} />
49+
</MainLayout>
50+
)}
51+
/>
4752

48-
<Route
49-
path="/profile"
50-
exact
51-
render={props => (
52-
<MainLayout>
53-
<ProfileView {...props} />
54-
</MainLayout>
55-
)}
56-
/>
53+
<Route
54+
path="/profile"
55+
exact
56+
render={props => (
57+
<MainLayout>
58+
<ProfileView {...props} />
59+
</MainLayout>
60+
)}
61+
/>
5762

58-
<Route
59-
path="/courses"
60-
render={props => (
61-
<MainLayout>
62-
<Courses {...props} />
63-
</MainLayout>
64-
)}
65-
/>
63+
<Route
64+
path="/courses"
65+
render={props => (
66+
<MainLayout>
67+
<CoursesView {...props} />
68+
</MainLayout>
69+
)}
70+
/>
71+
<Route
72+
path="/campusLeaders"
73+
exact
74+
render={props => (
75+
<MainLayout>
76+
<CAView {...props} />
77+
</MainLayout>
78+
)}
79+
/>
6680

67-
<Route
68-
path="/gallary"
69-
render={props => (
70-
<MainLayout>
71-
<CoursesView {...props} />
72-
</MainLayout>
73-
)}
74-
/>
75-
<Route
76-
path="/campusLeaders"
77-
exact
78-
render={props => (
79-
<MainLayout>
80-
<CAView {...props} />
81-
</MainLayout>
82-
)}
83-
/>
84-
</Switch>
85-
</Suspense>
81+
<Route
82+
path={`/machine-learning-using-python`}
83+
exact
84+
render={props => (
85+
<MainLayout>
86+
<MachineLearningView {...props} />
87+
</MainLayout>
88+
)}
89+
/>
90+
<Route
91+
path={`/ds-algo-with-java`}
92+
exact
93+
render={props => (
94+
<MainLayout>
95+
<AlgoJavaView {...props} />
96+
</MainLayout>
97+
)}
98+
/>
99+
<Route
100+
path={`/ds-algo-with-python`}
101+
exact
102+
render={props => (
103+
<MainLayout>
104+
<AlgoPythonView {...props} />
105+
</MainLayout>
106+
)}
107+
/>
108+
<Route
109+
path={`/fullstack-webdev-with-js`}
110+
exact
111+
render={props => (
112+
<MainLayout>
113+
<WebFullStakView {...props} />
114+
</MainLayout>
115+
)}
116+
/>
117+
<Route
118+
path={`/competitive-programming-using-java`}
119+
exact
120+
render={props => (
121+
<MainLayout>
122+
<CompetitiveJavaView {...props} />
123+
</MainLayout>
124+
)}
125+
/>
126+
<Route
127+
path={`/application-dev-using-python`}
128+
exact
129+
render={props => (
130+
<MainLayout>
131+
<PythonDevelopmentView {...props} />
132+
</MainLayout>
133+
)}
134+
/>
135+
</Switch>
136+
</Suspense>
137+
);
86138

87139
function Routes() {
88140
return renderRoutes({});

src/data/courses/advanced/CompetitiveJava.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ export const competitiveJava = {
22
difficulty: 'Intermediate',
33
duration: '30 Lectures',
44
level: 'Level 2',
5-
link: '/courses/competitive-programming-using-java',
5+
link: '/competitive-programming-using-java',
66
domain: 'Interview Prepration',
77
title: 'Competitve Programming using Java',
88
upcoming: 'Oct 1st',
99
schedule: [
1010
{
11+
courseId: "jcomp0121",
1112
dates: "10th Jan - 15th Apr",
1213
days: "Sat, Sun, Wed",
1314
timing: "06:00 PM - 08:00 PM (IST)",

src/data/courses/advanced/MachineLearning.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ export const machineLearning = {
22
difficulty: 'Intermediate',
33
duration: '30 Lectures',
44
level: 'Level 2',
5-
link: '/courses/machine-learning-using-python',
5+
link: '/machine-learning-using-python',
66
domain: 'Artificial Intelligence',
77
title: 'Master Machine Learning using Python',
88
upcoming: 'Oct 1st',
99
schedule: [
1010
{
11+
courseId: "mlpy1020",
1112
dates: "1st Oct - 5th Dec",
1213
days: "Sat, Sun, Tue, Thur",
1314
timing: "06:00 PM - 08:00 PM (IST)",
@@ -17,6 +18,7 @@ export const machineLearning = {
1718
active: true,
1819
},
1920
{
21+
courseId: "mlpy0121",
2022
dates: "10th Jan - 10th Apr",
2123
days: "Sat, Sun, Wed",
2224
timing: "06:00 PM - 08:00 PM (IST)",

src/data/courses/advanced/WebDevelopment.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
export const webDevelopment = {
2+
courseid: "",
23
difficulty: 'Intermediate',
34
duration: '30 Lectures',
45
level: 'Level 2',
5-
link: '/courses/fullstack-webdev-with-js',
6+
link: '/fullstack-webdev-with-js',
67
domain: 'Web Development',
78
title: 'Full Stack Web Development with JS',
89
upcoming: 'Oct 1st',
910
schedule: [
1011
{
12+
courseId: "jsfs1020",
1113
dates: "1st Oct - 5th Dec",
1214
days: "Sat, Sun, Tue, Thur",
1315
timing: "06:00 PM - 08:00 PM (IST)",
@@ -17,6 +19,7 @@ export const webDevelopment = {
1719
active: true,
1820
},
1921
{
22+
courseId: "jsfs0121",
2023
dates: "10th Jan - 10th Apr",
2124
days: "Sat, Sun, Wed",
2225
timing: "06:00 PM - 08:00 PM (IST)",

src/data/courses/foundation/AlgoJava.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ export const algoJava = {
22
difficulty: 'Foundation',
33
duration: '30 Lectures',
44
level: 'Level 1',
5-
link: '/courses/ds-algo-with-java',
5+
link: '/ds-algo-with-java',
66
domain: 'Algorithms',
77
title: 'Data Structure and Algorithms with Java',
88
upcoming: 'Oct 1st',
99
schedule: [
1010
{
11+
courseId: "jds1020",
1112
dates: '01st Oct - 05th Dec',
1213
days: 'Sat, Sun, Tue, Thur',
1314
timing: '06:00 PM - 08:00 PM (IST)',
@@ -17,6 +18,7 @@ export const algoJava = {
1718
active: true
1819
},
1920
{
21+
courseId: "jds0121",
2022
dates: '10th Jan - 10th Apr',
2123
days: 'Sat, Sun, Wed',
2224
timing: '06:00 PM - 08:00 PM (IST)',

src/data/courses/foundation/AlgoPython.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ export const algoPython = {
22
difficulty: 'Foundation',
33
duration: '30 Lectures',
44
level: 'Level 1',
5-
link: '/courses/ds-algo-with-python',
5+
link: '/ds-algo-with-python',
66
domain: 'Algorithms',
77
title: 'Data Structure and Algorithms with Python',
88
upcoming: 'Oct 1st',
99
schedule: [
1010
{
11+
courseId: "pds1020",
1112
dates: "1st Oct - 5th Dec",
1213
days: "Sat, Sun, Tue, Thur",
1314
timing: "06:00 PM - 08:00 PM (IST)",
@@ -17,6 +18,7 @@ export const algoPython = {
1718
active: true,
1819
},
1920
{
21+
courseId: "pds0121",
2022
dates: "10th Jan - 10th Apr",
2123
days: "Sat, Sun, Wed",
2224
timing: "06:00 PM - 08:00 PM (IST)",

src/data/courses/foundation/DevPython.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ export const devPython = {
22
difficulty: 'Foundation',
33
duration: '24 Lectures',
44
level: 'Level 1',
5-
link: '/courses/application-dev-using-python',
5+
link: '/application-dev-using-python',
66
domain: 'Development',
77
title: 'Application Development with Python',
88
upcoming: 'Oct 1st',
99
schedule: [
1010
{
11+
courseId: "pdev0121",
1112
dates: "15th Jan - 20th Apr",
1213
days: "Sat, Sun, Wed",
1314
timing: "06:00 PM - 08:00 PM (IST)",

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { SettingsProvider } from 'src/context/SettingsContext';
1616
import { configureStore } from 'src/store';
1717
import { restoreSettings } from 'src/utils/settings';
1818
import App from 'src/App';
19+
import { BrowserRouter } from 'react-router-dom';
1920

2021
enableES5();
2122

@@ -25,7 +26,9 @@ const settings = restoreSettings();
2526
ReactDOM.render(
2627
<Provider store={store}>
2728
<SettingsProvider settings={settings}>
28-
<App />
29+
<BrowserRouter>
30+
<App />
31+
</BrowserRouter>
2932
</SettingsProvider>
3033
</Provider>,
3134
document.getElementById('root')

src/layouts/MainLayout/TopBar/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function TopBar({ className, onMobileNavOpen, ...rest }) {
6565
const navItems = [
6666
{ title: 'Campus Leaders', link: '/campusLeaders' },
6767
{ title: 'Events', link: '/events' },
68-
{ title: 'Courses', link: '/gallary' },
68+
{ title: 'Courses', link: '/courses' },
6969
// { title: 'Team', link: '/team' }
7070
]
7171

src/views/pages/Courses/index.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)