This repository was archived by the owner on Jun 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { Footer } from "./Navigation/Footer";
1111import { About } from "./About" ;
1212import { UserSettings } from "./Users/UserSettings" ;
1313import { UserContextProvider } from "./Users/UserContext" ;
14+ import OrganizationSettings from "./Organization/OrganizationSettings" ;
1415
1516const 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 >
Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments