-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/lisasiliu/notification-page-ui (#91)
* created file to put ui code in * finished hardcoded notification table * updated backend to match main
- Loading branch information
Showing
7 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
frontend/src/components/NotificationCard/NotificationCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
type UserInfo = { | ||
name: string; | ||
email: string; | ||
account_type: string; | ||
}; | ||
|
||
export default function NotificationCard({ name, email, account_type }: UserInfo) { | ||
return ( | ||
<> | ||
<div | ||
className={ | ||
"flex items-center justify-between px-[40px] py-[60px] font-['Poppins'] text-[18px] " | ||
} | ||
> | ||
<div id="person_info" className=""> | ||
<div className="font-['Poppins-Bold']">Name: {name}</div> | ||
Email: {email} | ||
<br></br> | ||
Account Type: {account_type} | ||
</div> | ||
|
||
<div id="buttons" className="flex items-center space-x-[30px]"> | ||
<button className="h-[48px] w-[116px] rounded-full border border-pia_dark_green bg-pia_primary_white text-pia_dark_green"> | ||
Deny | ||
</button> | ||
<button className="h-[48px] w-[116px] rounded-full border bg-pia_dark_green text-pia_primary_white"> | ||
Approve | ||
</button> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
23 changes: 23 additions & 0 deletions
23
frontend/src/components/NotificationCard/NotificationTable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import NotificationCard from "./NotificationCard"; | ||
|
||
export default function NotificationTable() { | ||
return ( | ||
<div className="m-auto max-w-full border-collapse border-separate rounded-[15px] border-[1px] border-pia_neutral_gray bg-pia_primary_white"> | ||
<div> | ||
<NotificationCard | ||
name="Alice Anderson" | ||
email="[email protected]" | ||
account_type="Team" | ||
/> | ||
</div> | ||
<div className="border-[1px] border-pia_neutral_gray" /> | ||
<div> | ||
<NotificationCard name="Chloe Cai" email="[email protected]" account_type="Admin" /> | ||
</div> | ||
<div className="border-[1px] border-pia_neutral_gray" /> | ||
<div> | ||
<NotificationCard name="Henry Harris" email="[email protected]" account_type="Team" /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { User } from "../../api/user"; | ||
|
||
// export type Columns = ColumnDef<Student, string | Contact>[]; | ||
export type StudentMap = User; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import NotificationTable from "@/components/NotificationCard/NotificationTable"; | ||
import { useRedirectTo404IfNotAdmin, useRedirectToLoginIfNotSignedIn } from "@/hooks/redirect"; | ||
|
||
export default function Notifications() { | ||
useRedirectToLoginIfNotSignedIn(); | ||
useRedirectTo404IfNotAdmin(); | ||
return ( | ||
<main> | ||
<h1>PIA Notifications Page!</h1> | ||
<div className="my-[30px] ml-[20px] mr-[80px] space-y-[20px]"> | ||
<div className="font-[alternate-gothic] text-4xl uppercase">Notifications</div> | ||
<div className="font-[Poppins] text-[16px]"> | ||
Review information of new account creations below to approve or deny them.{" "} | ||
</div> | ||
<NotificationTable /> | ||
</div> | ||
</main> | ||
); | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters