#31 Added course page that querys backend for a specific course id
This commit was merged in pull request #40.
This commit is contained in:
@@ -4,6 +4,7 @@ import HomePage from "./pages/HomePage";
|
||||
import LoginPage from "./pages/LoginPage";
|
||||
import LogoutPage from "./pages/LogoutPage";
|
||||
import RegisterPage from "./pages/RegisterPage";
|
||||
import CoursePage from "./pages/CoursePage";
|
||||
import AuthenticatedRoute from "./components/AuthenticatedRoute";
|
||||
|
||||
function App() {
|
||||
@@ -20,15 +21,25 @@ function App() {
|
||||
</AuthenticatedRoute>
|
||||
</Route>
|
||||
<Route path="/register">
|
||||
<AuthenticatedRoute isAuthenticated={false}>
|
||||
<AuthenticatedRoute>
|
||||
<RegisterPage />
|
||||
</AuthenticatedRoute>
|
||||
</Route>
|
||||
<Route path="/">
|
||||
<AuthenticatedRoute isAuthenticated={true}>
|
||||
<AuthenticatedRoute>
|
||||
<HomePage />
|
||||
</AuthenticatedRoute>
|
||||
</Route>
|
||||
|
||||
<Route path="/course/:id">
|
||||
{(params) => {
|
||||
return (
|
||||
<AuthenticatedRoute>
|
||||
<CoursePage id={params.id} />
|
||||
</AuthenticatedRoute>
|
||||
);
|
||||
}}
|
||||
</Route>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user