Skip to content

Commit

Permalink
create AdminSchedulePostingPage placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
hujoseph99 committed Mar 19, 2022
1 parent da88911 commit 04081c7
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 @@ -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";

0 comments on commit 04081c7

Please sign in to comment.