diff --git a/src/app/private/[uid]/chapter-leader/layout.tsx b/src/app/private/[uid]/chapter-leader/layout.tsx index dedb653d..a1eb7045 100644 --- a/src/app/private/[uid]/chapter-leader/layout.tsx +++ b/src/app/private/[uid]/chapter-leader/layout.tsx @@ -35,11 +35,6 @@ const UserLayout = ({ children }: IUserLayout) => { link: `/private/${user.id}/chapter-leader/seniors`, icon: faUserGroup, }, - { - name: "Pending", - link: `/private/${user.id}/chapter-leader/pending`, - icon: faUserPlus, - }, { name: "Profile", link: `/private/${user.id}/chapter-leader/edit-profile`, diff --git a/src/app/private/[uid]/chapter-leader/pending/PendingHomePage.tsx b/src/app/private/[uid]/chapter-leader/pending/PendingHomePage.tsx deleted file mode 100644 index 27167fcc..00000000 --- a/src/app/private/[uid]/chapter-leader/pending/PendingHomePage.tsx +++ /dev/null @@ -1,35 +0,0 @@ -"use client"; - -import PendingCard from "@components/PendingCard"; -import { CardGrid } from "@components/container"; -import { User } from "@prisma/client"; - -type MembersHomePageProps = { - users: User[]; -}; - -const PendingHomePage = ({ users }: MembersHomePageProps) => { - return ( - <> -

- {`Pending (${users.length})`} -

- {users.length > 0 ? ( - { - return ( - - ); - })} - /> - ) : ( -

- {"This chapter has no pending members."} -

- )} - - ); -}; - -export default PendingHomePage; diff --git a/src/app/private/[uid]/chapter-leader/pending/layout.tsx b/src/app/private/[uid]/chapter-leader/pending/layout.tsx deleted file mode 100644 index b52667ac..00000000 --- a/src/app/private/[uid]/chapter-leader/pending/layout.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { HeaderContainer } from "@components/container"; -import { faUserGroup } from "@fortawesome/free-solid-svg-icons"; - -interface LayoutProps { - children?: React.ReactNode; -} - -const Layout = (props: LayoutProps) => { - return ( - - {props.children} - - ); -}; - -export default Layout; diff --git a/src/app/private/[uid]/chapter-leader/pending/page.tsx b/src/app/private/[uid]/chapter-leader/pending/page.tsx deleted file mode 100644 index 42a97be7..00000000 --- a/src/app/private/[uid]/chapter-leader/pending/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react"; -import { prisma } from "@server/db/client"; -import PendingHomePage from "./PendingHomePage"; -import { User } from "@prisma/client"; - -const PendingPage = async ({ params }: { params: { uid: string } }) => { - const user = await prisma.user.findFirstOrThrow({ - where: { - id: params.uid, - }, - }); - - const userRequests = await prisma.userRequest.findMany({ - where: { - chapterId: user.ChapterID ?? "", - approved: "PENDING", - }, - }); - - const users: User[] = []; - - for (let i = 0; i < userRequests.length; i++) { - const user = await prisma.user.findFirstOrThrow({ - where: { - id: userRequests[i]?.uid ?? "", - }, - }); - - users.push(user); - } - - return ; -}; - -export default PendingPage; diff --git a/src/components/DisplayChapterInfo.tsx b/src/components/DisplayChapterInfo.tsx index 07928b13..34f48150 100644 --- a/src/components/DisplayChapterInfo.tsx +++ b/src/components/DisplayChapterInfo.tsx @@ -97,7 +97,9 @@ const DisplayChapterInfo = ({ user.role === "USER" ? "" : `/private/${user.id}/${RoleToUrlSegment[user.role]}` + - `${user.role === "ADMIN" && `/home/chapters/${chapter.id}`}` + + `${ + user.role === "ADMIN" ? `/home/chapters/${chapter.id}` : "" + }` + `/users/${student.id}`; return ; })} diff --git a/src/components/TileGrid/SeniorTile.tsx b/src/components/TileGrid/SeniorTile.tsx index 0fd0d445..08347e03 100644 --- a/src/components/TileGrid/SeniorTile.tsx +++ b/src/components/TileGrid/SeniorTile.tsx @@ -59,12 +59,6 @@ export function SeniorTile({ }, ]; - console.log( - `${senior.firstname} ${senior.lastname}` + - "'s Students: " + - senior.StudentIDs.toString() - ); - return (