Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create AdminSchedulePostingPage #223

Merged
merged 1 commit into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import SideNavbarDemo from "./components/pages/SideNavbarDemo";
import customTheme from "./theme";
import { AuthenticatedUser } from "./types/AuthTypes";
import VolunteerShiftsPage from "./components/pages/volunteer/shift/VolunteerShiftsPage";
import AdminSchedulePostingPage from "./components/pages/admin/schedule/AdminSchedulePostingPage";

const App = (): React.ReactElement => {
const currentUser: AuthenticatedUser = getLocalStorageObj<AuthenticatedUser>(
Expand Down Expand Up @@ -167,6 +168,11 @@ const App = (): React.ReactElement => {
path={Routes.ADMIN_POSTING_DETAILS}
component={AdminPostingDetails}
/>
<PrivateRoute
exact
path={Routes.ADMIN_SCHEDULE_POSTING_PAGE}
component={AdminSchedulePostingPage}
/>
<PrivateRoute
exact
path={Routes.NOT_FOUND_PAGE}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Flex, Text, VStack } from "@chakra-ui/react";
import React from "react";

import { useParams } from "react-router-dom";

const AdminSchedulePostingPage = (): React.ReactElement => {
const { id } = useParams<{ id: string }>();

return (
<Flex
flexDir="column"
width="100%"
height="100vh"
justifyContent="center"
alignItems="center"
>
<VStack spacing={4}>
<Text>Hello! 👋 This is a placeholder page.</Text>
<Text>The id is: {id}</Text>
</VStack>
</Flex>
);
};

export default AdminSchedulePostingPage;
2 changes: 2 additions & 0 deletions frontend/src/constants/Routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ export const ADMIN_POSTING_CREATE_REVIEW_PAGE = "/admin/posting/create/review";
export const VOLUNTEER_POSTING_DETAILS = "/volunteer/posting/:id";

export const ADMIN_POSTING_DETAILS = "/admin/posting/:id";

export const ADMIN_SCHEDULE_POSTING_PAGE = "/admin/schedule/posting/:id";