Skip to content

Commit

Permalink
create AdminSchedulePostingPage placeholder (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
hujoseph99 authored and LenaNguyen committed Mar 24, 2022
1 parent 18aff88 commit ad8b2bd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import AdminPostingDetails from "./components/pages/admin/posting/AdminPostingDe
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 @@ -161,6 +162,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 @@ -34,3 +34,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";

0 comments on commit ad8b2bd

Please sign in to comment.