Skip to content

Commit

Permalink
Merge pull request prasadhonrao#71 from prasadhonrao:feature/issue-70
Browse files Browse the repository at this point in the history
Define basic page and component structure. Define route accordingly.

Closes prasadhonrao#70
  • Loading branch information
prasadhonrao authored Oct 7, 2024
2 parents e61315d + 7c5fbd5 commit 5e7b41f
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 10 deletions.
38 changes: 30 additions & 8 deletions ui/src/App.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import Layout from './components/Layout';

import HomePage from './pages/HomePage';
import LoginPage from './pages/LoginPage';
import RegisterPage from './pages/RegisterPage';
import AboutPage from './pages/AboutPage';
import BootcampsPage from './pages/BootcampsPage';
import AddBootcampPage from './pages/AddBootcampPage';
import AddReviewPage from './pages/AddReviewPage';
import NotFoundPage from './pages/NotFoundPage';

import LoginPage from './pages/user/LoginPage';
import RegisterPage from './pages/user/RegisterPage';
import UserDetailsPage from './pages/user/UserDetailsPage';

import BootcampsPage from './pages/bootcamps/BootcampsPage';
import BootcampDetailsPage from './pages/bootcamps/BootcampDetailsPage';

import ManageBootcampPage from './pages/bootcamps/ManageBootcampPage';
import AddBootcampPage from './pages/bootcamps/AddBootcampPage';

import ManageCoursesPage from './pages/bootcamps/ManageCoursesPage';
import AddCoursePage from './pages/bootcamps/AddCoursePage';

import BootcampReviewsPage from './pages/bootcamps/BootcampReviewsPage';
import ManageReviewsPage from './pages/bootcamps/ManageReviewsPage';
import AddReviewPage from './pages/bootcamps/AddReviewPage';

function App() {
return (
<Router>
<Layout />
<div>
<Routes>
<Route exact path="/" element={<HomePage />} />
<Route exact path="/login" element={<LoginPage />} />
<Route exact path="/register" element={<RegisterPage />} />
<Route path="/" element={<HomePage />} />
<Route path="/about" element={<AboutPage />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/register" element={<RegisterPage />} />
<Route path="/user/:userId" element={<UserDetailsPage />} />
<Route path="/bootcamps" element={<BootcampsPage />} />
<Route path="/bootcamps/:bootcampId" element={<BootcampDetailsPage />} />
<Route path="/bootcamps/add" element={<AddBootcampPage />} />
<Route path="/bootcamps/:bootcampId/manage" element={<ManageBootcampPage />} />
<Route path="/bootcamps/:bootcampId/courses/add" element={<AddCoursePage />} />
<Route path="/bootcamps/:bootcampId/courses/manage" element={<ManageCoursesPage />} />
<Route path="/bootcamps/:bootcampId/reviews" element={<BootcampReviewsPage />} />
<Route path="/bootcamps/:bootcampId/reviews/manage" element={<ManageReviewsPage />} />{' '}
<Route path="/bootcamps/:bootcampId/reviews/add" element={<AddReviewPage />} />
<Route path="*" element={<NotFoundPage />} />
</Routes>
</div>
</Router>
Expand Down
5 changes: 5 additions & 0 deletions ui/src/pages/NotFoundPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const NotFoundPage = () => {
return <div>Not Found Page</div>;
};

export default NotFoundPage;
File renamed without changes.
5 changes: 5 additions & 0 deletions ui/src/pages/bootcamps/AddCoursePage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const AddCoursePage = () => {
return <div>Add Course Page</div>;
};

export default AddCoursePage;
File renamed without changes.
5 changes: 5 additions & 0 deletions ui/src/pages/bootcamps/BootcampDetailsPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const BootcampDetailsPage = () => {
return <div>Bootcamp Details Page</div>;
};

export default BootcampDetailsPage;
5 changes: 5 additions & 0 deletions ui/src/pages/bootcamps/BootcampReviewsPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const BootcampReviewsPage = () => {
return <div>Bootcamp Reviews Page</div>;
};

export default BootcampReviewsPage;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BrowseBootcampsPage = () => {
const BootcampsPage = () => {
return (
<section className="browse my-5">
<div className="container">
Expand Down Expand Up @@ -193,4 +193,4 @@ const BrowseBootcampsPage = () => {
);
};

export default BrowseBootcampsPage;
export default BootcampsPage;
5 changes: 5 additions & 0 deletions ui/src/pages/bootcamps/ManageBootcampPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const ManageBootcampPage = () => {
return <div>Manage Bootcamp Page</div>;
};

export default ManageBootcampPage;
5 changes: 5 additions & 0 deletions ui/src/pages/bootcamps/ManageCoursesPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const ManageCoursesPage = () => {
return <div>Manage Courses Page</div>;
};

export default ManageCoursesPage;
5 changes: 5 additions & 0 deletions ui/src/pages/bootcamps/ManageReviewsPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const ManageReviewsPage = () => {
return <div>Manage Reviews Page</div>;
};

export default ManageReviewsPage;
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions ui/src/pages/user/UserDetailsPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const UserDetailsPage = () => {
return (
<div>
<p>User Details Page</p>
<p>Add Update password functionality here</p>
</div>
);
};

export default UserDetailsPage;

0 comments on commit 5e7b41f

Please sign in to comment.