Skip to content

Commit

Permalink
create route for payment
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya committed Nov 9, 2023
1 parent fb24b97 commit d3f6bb8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import EditCourse from "./components/core/Dashboard/EditCourse";
import { useSelector } from "react-redux";
import Catalog from "./pages/Catalog";
import CourseDetails from "./pages/CourseDetails";
import ViewCourse from "./pages/ViewCourse";
import VideoDetails from "./components/core/ViewCourse/VideoDetails";

export default function App() {
const { user } = useSelector((state) => state.profile);
Expand Down Expand Up @@ -111,6 +113,23 @@ export default function App() {
</>
)}
</Route>

<Route
element={
<PrivateRoute>
<ViewCourse />
</PrivateRoute>
}
>
{user?.accountType === ACCOUNT_TYPE.STUDENT && (
<>
<Route
path="view-course/:courseId/section/:sectionId/sub-section/:subSectionId"
element={<VideoDetails />}
/>
</>
)}
</Route>
</Routes>
</div>
);
Expand Down

0 comments on commit d3f6bb8

Please sign in to comment.