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

Commit 72f170a

Browse files
committed
OrganizationSettings layout
1 parent 34c572d commit 72f170a

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

client/src/Organization/OrganizationSettings.tsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import React, { useContext, useEffect } from "react";
22
import UserContext from "../Users/UserContext";
3+
import { Organization } from "./OrganizationApi";
4+
5+
interface OrganizationSettingsProps {
6+
org: Organization;
7+
}
38

49
const OrganizationSettings: React.FC = () => {
510
const tsrUser = useContext(UserContext);
11+
const url = window.location.href;
12+
const orgPath = url.length - 1;
13+
const orgId = url[orgPath];
614

715
useEffect(() => {
816
if (tsrUser === undefined) {
@@ -19,11 +27,18 @@ const OrganizationSettings: React.FC = () => {
1927
}
2028

2129
return (
22-
<>
23-
<h1 className="UserSettings-Header">{`${tsrUser.username} organization settings`}</h1>
24-
<p>Role: {tsrUser.role}</p>
25-
<p>{tsrUser.settings.organizations}</p>
26-
</>
30+
<div className="Event-Details-Container">
31+
<h1 className="UserSettings-Header">{`${tsrUser.username} organization: ${orgId} settings`}</h1>
32+
<div className="space-3" />
33+
<form>
34+
<h2>Role</h2>
35+
<select defaultValue={undefined}>
36+
<option>---</option>
37+
<option value={`${tsrUser.userId}:${url}`}>Resourcer</option>
38+
</select>
39+
<div className="space-3" />
40+
</form>
41+
</div>
2742
);
2843
};
2944

0 commit comments

Comments
 (0)