-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from UTDNebula/component-reworks
Component Reorganization
- Loading branch information
Showing
72 changed files
with
436 additions
and
410 deletions.
There are no files selected for viewing
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
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,12 +1,12 @@ | ||
import AddOrg from '@src/components/admin/AddOrg'; | ||
import AddClub from '@src/components/admin/AddClub'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="m-5 md:pl-72"> | ||
<h1 className="text-center text-4xl font-bold text-black"> | ||
Add Orgs to Carousel | ||
Add Clubs to Carousel | ||
</h1> | ||
<AddOrg /> | ||
<AddClub /> | ||
</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
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,11 @@ | ||
import OrgTable from '@src/components/admin/OrgTable'; | ||
import ClubTable from '@src/components/admin/ClubTable'; | ||
import { api } from '@src/trpc/server'; | ||
|
||
export default async function Page() { | ||
const clubs = await api.admin.allOrgs(); | ||
const clubs = await api.admin.allClubs(); | ||
return ( | ||
<div className="m-5 md:pl-72"> | ||
<OrgTable clubs={clubs} /> | ||
<ClubTable clubs={clubs} /> | ||
</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
File renamed without changes.
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
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
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
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
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
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
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
File renamed without changes.
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
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
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
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
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
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,30 +1,32 @@ | ||
import Header from "@src/components/BaseHeader"; | ||
import { getServerAuthSession } from "@src/server/auth"; | ||
import { api } from "@src/trpc/server"; | ||
import { signInRoute } from "@src/utils/redirect"; | ||
import { redirect, notFound } from "next/navigation"; | ||
import CreateEventForm from "./CreateEventForm"; | ||
import Header from '@src/components/header/BaseHeader'; | ||
import { getServerAuthSession } from '@src/server/auth'; | ||
import { api } from '@src/trpc/server'; | ||
import { signInRoute } from '@src/utils/redirect'; | ||
import { redirect, notFound } from 'next/navigation'; | ||
import CreateEventForm from './CreateEventForm'; | ||
|
||
const Page = async ({ params }: { params: { clubId: string } }) => { | ||
const session = await getServerAuthSession(); | ||
if (!session) { | ||
redirect(signInRoute(`manage/${params.clubId}/create`)); | ||
} | ||
const session = await getServerAuthSession(); | ||
if (!session) { | ||
redirect(signInRoute(`manage/${params.clubId}/create`)); | ||
} | ||
|
||
const officerClubs = await api.club.getOfficerClubs(); | ||
const currentClub = officerClubs.filter(val => { | ||
return val.id == params.clubId | ||
})[0]; | ||
if (!currentClub) { | ||
notFound(); | ||
} | ||
const officerClubs = await api.club.getOfficerClubs(); | ||
const currentClub = officerClubs.filter((val) => { | ||
return val.id == params.clubId; | ||
})[0]; | ||
if (!currentClub) { | ||
notFound(); | ||
} | ||
|
||
return ( | ||
<main className="h-screen md:pl-72"> | ||
<Header /> | ||
<div className="flex flex-row justify-between gap-20 px-5"> | ||
<CreateEventForm clubId={currentClub.id} officerClubs={officerClubs} /> | ||
</div> | ||
</main> | ||
); | ||
}; | ||
export default Page; | ||
|
||
return (<main className="md:pl-72 h-screen"> | ||
<Header /> | ||
<div className="flex flex-row justify-between gap-20 px-5"> | ||
<CreateEventForm clubId={currentClub.id} officerClubs={officerClubs} /> | ||
</div> | ||
|
||
</main>) | ||
} | ||
export default Page; |
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.