Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit 0ffae23

Browse files
committed
Add DrawerMenu and Route
1 parent 7f0a37a commit 0ffae23

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

client/src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Footer } from "./Navigation/Footer";
1111
import { About } from "./About";
1212
import { UserSettings } from "./Users/UserSettings";
1313
import { UserContextProvider } from "./Users/UserContext";
14+
import OrganizationSettings from "./Organization/OrganizationSettings";
1415

1516
const App: React.FC = () => {
1617
return (
@@ -26,6 +27,10 @@ const App: React.FC = () => {
2627
<Route path="/editEvent/:eventId" component={CreateEvent} />
2728
<Route path="/event/:eventId" component={EventPage} />
2829
<Route path="/about" component={About} />
30+
<Route
31+
path="/organizationSettings"
32+
component={OrganizationSettings}
33+
/>
2934
<Route path="/settings" component={UserSettings} />
3035
<Route path="/" component={Home} />
3136
</Switch>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React, { useContext, useEffect } from "react";
2+
import UserContext from "../Users/UserContext";
3+
4+
const OrganizationSettings: React.FC = () => {
5+
const tsrUser = useContext(UserContext);
6+
7+
useEffect(() => {
8+
if (tsrUser === undefined) {
9+
return;
10+
}
11+
}, [tsrUser]);
12+
13+
if (tsrUser === undefined) {
14+
return <></>;
15+
}
16+
17+
return (
18+
<>
19+
<h1 className="UserSettings-Header">{`${tsrUser.username} organization settings`}</h1>
20+
<p>`Role :${tsrUser.role}`</p>
21+
</>
22+
);
23+
};
24+
25+
export default OrganizationSettings;

0 commit comments

Comments
 (0)