Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 149 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
daf735e
Setting up GitHub Classroom Feedback
github-classroom[bot] May 19, 2023
1378e5d
Set up team.md
ishaan-upadhyay May 20, 2023
2548388
Update team.md
shinzahmed May 20, 2023
31a6a63
Signed Team Contract
aajaleel May 24, 2023
2bf1017
Initial app setup
ishaan-upadhyay May 30, 2023
c2424fd
[wip] feat: add project background, db connection
ishaan-upadhyay May 31, 2023
27f6dac
fix: merge gitignores
ishaan-upadhyay May 31, 2023
640e067
Initial API setup
ishaan-upadhyay Jun 1, 2023
13aa901
feat: basic user api route implementation
TheDannyG Jun 2, 2023
10047c1
refactor: lint and format files
ishaan-upadhyay Jun 2, 2023
389791d
update the product.md with written responses to Q4 and highlights (bo…
PDOracle Jun 2, 2023
13fc486
completed product backlog
aajaleel Jun 2, 2023
cfcff43
feat: add signup page
TheDannyG Jun 2, 2023
441f8a2
refactor: folder rename, cleanup
ishaan-upadhyay Jun 2, 2023
fd2ea14
Merge pull request #2 from CSCC012023/feature/signup
ishaan-upadhyay Jun 2, 2023
b904b2e
fix: remove unnecessary params arg
ishaan-upadhyay Jun 2, 2023
73a4bdd
Merge pull request #3 from CSCC012023/bugfix/vercel-deployment-api-ty…
mirajismail Jun 2, 2023
594f84b
Update product_backlog.md
aajaleel Jun 2, 2023
8b52fa7
Update product.md
aliasana Jun 3, 2023
918e8b0
feat: polished documentation
ishaan-upadhyay Jun 3, 2023
b7ff0e4
Feature: Finish up Sprint 0 Docs
ishaan-upadhyay Jun 3, 2023
cdded46
Add files via upload
shinzahmed Jun 3, 2023
84d5bc0
Uploading artefact.md
ishaan-upadhyay Jun 3, 2023
865b6f1
feat - add password hashing
TheDannyG Jun 7, 2023
d5c128f
feat: add password creation rules
TheDannyG Jun 7, 2023
8075189
Initial versions of planning documents
mirajismail Jun 7, 2023
ab5d828
Upload company logo
aajaleel Jun 8, 2023
e4e964c
Merge pull request #6 from CSCC012023/feature/insert-logo
ishaan-upadhyay Jun 8, 2023
e235282
docs: add sprint0 marks
navn-r Jun 13, 2023
f2d3541
finished the sign up
aliasana Jun 14, 2023
900ec37
updates to the sign up page
aliasana Jun 14, 2023
30a8b95
update
aliasana Jun 14, 2023
a77b0f7
Initial version of setup.sql
ishaan-upadhyay Jun 15, 2023
cbf98b2
Initial system design document version
ishaan-upadhyay Jun 15, 2023
7498854
feat: change db schema
TheDannyG Jun 15, 2023
3411a7f
Rewrite users API endpoint to use Prisma
ishaan-upadhyay Jun 16, 2023
f2e8c56
Run prisma generate on Vercel deploy
ishaan-upadhyay Jun 16, 2023
5ae1544
Merge pull request #7 from CSCC012023/feature/prisma
TheDannyG Jun 16, 2023
d2948fc
fix: fix syntax errors, ordering, schemas
TheDannyG Jun 16, 2023
60ac12c
Merge branch 'main' into feature/password-improvements
ishaan-upadhyay Jun 16, 2023
ce6728c
Merge pull request #9 from CSCC012023/feature/password-improvements
TheDannyG Jun 16, 2023
4999697
Merge pull request #8 from CSCC012023/feature/db
TheDannyG Jun 16, 2023
a1b7220
Intermediate events API version
ishaan-upadhyay Jun 15, 2023
7ac39ae
Experiences API route initial version (GET, POST)
ishaan-upadhyay Jun 16, 2023
fff16c9
Update setup.sql
ishaan-upadhyay Jun 16, 2023
7d54541
Remove unnecessary db.js functions
ishaan-upadhyay Jun 16, 2023
a1d12b3
Remove unnecessary eslint annotation
ishaan-upadhyay Jun 16, 2023
f0ce90c
Remove unnecessary .ts extension on import
ishaan-upadhyay Jun 16, 2023
2ca24bf
Remove unnecessary console.log calls
ishaan-upadhyay Jun 16, 2023
39c36bd
Merge pull request #10 from CSCC012023/feature/events-api-route
ishaan-upadhyay Jun 16, 2023
2ee4e9b
made some changes for the sign up
aliasana Jun 16, 2023
5461266
Update page.tsx
aliasana Jun 16, 2023
4bd9a95
Create pull_request_template.md
ishaan-upadhyay Jun 16, 2023
1228bbe
Merge branch 'main' into feature/signup-page
ishaan-upadhyay Jun 16, 2023
511351f
Minor fixes
ishaan-upadhyay Jun 16, 2023
f37d069
update and delete
mirajismail Jun 16, 2023
a5713a7
Merge branch 'main' into feature/users-api-route merging main to feat…
mirajismail Jun 16, 2023
9d0bc2c
Fix minor issues
ishaan-upadhyay Jun 16, 2023
eaa1f64
Fix build issues
ishaan-upadhyay Jun 16, 2023
93206db
tested update function. bug in delete
mirajismail Jun 16, 2023
e7bd463
Fix experiences route where clause
ishaan-upadhyay Jun 16, 2023
52f2f7d
almost done branch
mirajismail Jun 16, 2023
8eed5bd
final changes
aliasana Jun 16, 2023
b149231
fix: fix user deletion, update singe user get to prisma
TheDannyG Jun 16, 2023
8caeb29
Merge pull request #12 from CSCC012023/feature/signup-page
mirajismail Jun 16, 2023
6be3f85
feat: add api documentation for users api route
TheDannyG Jun 16, 2023
8868f6f
Merge branch 'main' into feature/users-api-route
TheDannyG Jun 16, 2023
90fd0ea
Move pull request template
ishaan-upadhyay Jun 16, 2023
a89bfa1
add sprint review and update system design doc
TheDannyG Jun 17, 2023
eee6a8d
fix lost iteration-1.plan and improve RPM
TheDannyG Jun 17, 2023
40409a9
Merge pull request #13 from CSCC012023/feature/sprint1-planning
mirajismail Jun 17, 2023
f696c7b
Merge pull request #11 from CSCC012023/feature/users-api-route
mirajismail Jun 17, 2023
4586534
Rename iteration-1.plan.md to iteration-01.plan.md
TheDannyG Jun 17, 2023
4d07b8a
Merge pull request #14 from CSCC012023/Final-fixes
TheDannyG Jun 17, 2023
c471cf5
started iteration-02 planning
mirajismail Jun 29, 2023
ab49eb3
Auto-generated API docs
ishaan-upadhyay Jun 30, 2023
48d45cf
Initial version of experiences API for single events
ishaan-upadhyay Jun 30, 2023
d665213
Merge pull request #15 from CSCC012023/feature/individual-events-api
mirajismail Jun 30, 2023
cdf9b1e
Move files
ishaan-upadhyay Jun 30, 2023
b5d248b
Merge pull request #16 from CSCC012023/feature/api-docs
ishaan-upadhyay Jun 30, 2023
9817326
Initial version of event-specific details page
ishaan-upadhyay Jun 30, 2023
39fe826
Display most event props
ishaan-upadhyay Jun 30, 2023
43e43b8
Some design polishing
ishaan-upadhyay Jun 30, 2023
b1a3218
Add header, footer, FontAwesome icons, polish page
ishaan-upadhyay Jul 2, 2023
d91549e
[feat] Polished event details page
ishaan-upadhyay Jul 3, 2023
d21db64
[bugfix] Check if Users GET response is empty
ishaan-upadhyay Jul 3, 2023
5bd1e59
Missed comment
ishaan-upadhyay Jul 3, 2023
41bcb25
Merge pull request #18 from CSCC012023/bugfix/users-api-check-not-empty
ishaan-upadhyay Jul 3, 2023
690a4b3
Remove sensitive information
ishaan-upadhyay Jul 3, 2023
a53625c
Update .env.template and README.md
ishaan-upadhyay Jul 3, 2023
a40ff0e
Merge branch 'main' into feature/CIT-17-event-details-page
ishaan-upadhyay Jul 3, 2023
0169749
Merge pull request #17 from CSCC012023/feature/CIT-17-event-details-page
ishaan-upadhyay Jul 3, 2023
6809e32
docs: add sprint1 marks
navn-r Jul 3, 2023
c4e164e
Change the experiences/[id] API route to use PUT instead of POST
ishaan-upadhyay Jul 4, 2023
7d14542
Merge pull request #19 from CSCC012023/bugfix/change-update-experienc…
ishaan-upadhyay Jul 4, 2023
f2d6cfc
Next Auth support + Prisma DB overhaul (#21)
ishaan-upadhyay Jul 5, 2023
fa2365a
Database overhaul, general cleanup (#22)
ishaan-upadhyay Jul 6, 2023
0043a18
Remove extraneous file
ishaan-upadhyay Jul 6, 2023
611db1e
Quick hotfix for signup endpoint (#23)
ishaan-upadhyay Jul 7, 2023
27d7cfc
Add interests field to users (#24)
ishaan-upadhyay Jul 7, 2023
b462d13
Unnecessary backslash (#26)
ishaan-upadhyay Jul 7, 2023
9dcacca
[CIT-16] Allow users to view a list of events (#25)
aliasana Jul 7, 2023
0340c5e
[CIT-41] Allow users to express interest in events (#28)
ishaan-upadhyay Jul 7, 2023
b6966a3
Revert mistaken deletions
ishaan-upadhyay Jul 7, 2023
569c6d0
sprint retrospective
mirajismail Jul 8, 2023
54b52bc
Merge pull request #29 from CSCC012023/feature/sprint-2-planning
mirajismail Jul 8, 2023
3447eb2
Add schedule.pdf and burndown.pdf
ishaan-upadhyay Jul 8, 2023
f595aa6
Create PB.md
TheDannyG Jul 8, 2023
92d748b
CIT-40 Organizer Sign Up, Authentication, and Project Restructuring (…
TheDannyG Jul 12, 2023
4626dd8
[Bugfix] Add socials for DB client fix
ishaan-upadhyay Jul 12, 2023
b45c14b
[Bugfix]: Fix users API routes
ishaan-upadhyay Jul 12, 2023
533f5a2
docs: add sprint2 marks
navn-r Jul 15, 2023
e2587e1
CIT-35: organizer add event (#31)
TheDannyG Jul 17, 2023
edffadb
[CIT-42] Add dashboard for organization to manage events (#32)
ishaan-upadhyay Jul 17, 2023
c388ecc
Add migration file for updating user profile
aajaleel Jul 15, 2023
cef67f5
Merge pull request #33 from CSCC012023/feature/CIT-19-add-users-socia…
aajaleel Jul 18, 2023
fd08033
Bugfix: Remove missed migration file (#34)
ishaan-upadhyay Jul 18, 2023
8a9485c
CIT-27: Final bugfixes
PDOracle Jul 20, 2023
89ca465
CIT-27: Fix data model, API endpoints and requests
ishaan-upadhyay Jul 20, 2023
ef2394a
[CIT-20] User search event by date (#35)
mirajismail Jul 21, 2023
da7f145
CIT-27: Cleanup, add API docs
ishaan-upadhyay Jul 21, 2023
edc883a
Merge branch 'main' into feature/CIT-27-user-look-registered-event
ishaan-upadhyay Jul 21, 2023
05e8a58
CIT-27: Modify migrations after attempted run
ishaan-upadhyay Jul 21, 2023
f7de1a3
CIT-27: Pagination bug fix
ishaan-upadhyay Jul 21, 2023
fdce2e0
Merge pull request #36 from CSCC012023/feature/CIT-27-user-look-regis…
PDOracle Jul 21, 2023
897dcfa
CIT-39: Implement user viewing who attends events (#38)
PDOracle Jul 21, 2023
6eef787
CIT-36: Implement Orgs viewing users attending (#37)
PDOracle Jul 21, 2023
910e03f
[CIT-44] Enable users to organize events (#40)
ishaan-upadhyay Jul 21, 2023
d2879bb
[CIT-43] Enable users to edit events they've created (#41)
ishaan-upadhyay Jul 21, 2023
ef8530d
[CIT-43] Bugfix, add user attending status (#42)
ishaan-upadhyay Jul 21, 2023
f732a98
[CIT-34] Allow organizers to edit events they've created (#43)
mirajismail Jul 21, 2023
485e64d
[CIT-23] Uninterested Button (#44)
TheDannyG Jul 21, 2023
2f4df73
[CIT-38] Bugfix on event delete (#45)
ishaan-upadhyay Jul 21, 2023
1595d5d
docs: update sprint2 marks
navn-r Jul 21, 2023
6b1a0a8
Add Sprint 03 docs (#46)
TheDannyG Jul 22, 2023
867bca2
docs: add sprint3 marks
navn-r Jul 22, 2023
9b15bb0
Feature/cit 31 contact developers (#47)
aajaleel Aug 4, 2023
676fcd2
Feature/cit 18 view users (#39)
aliasana Aug 4, 2023
d007901
Trigger build
ishaan-upadhyay Aug 4, 2023
237de1e
finished sprint-04 docs (#49)
mirajismail Aug 5, 2023
c5dd676
docs: add sprint4 marks
navn-r Aug 10, 2023
cca3075
[CIT-28] Allow users to message one another (#51)
ishaan-upadhyay Aug 10, 2023
4ebec0d
[CIT-19] Update user profile (#48)
aajaleel Aug 10, 2023
5d797e1
Feature/cit 26 user payments (#50)
mirajismail Aug 10, 2023
2134f32
Fix failing builds from CIT-26 merge (#54)
ishaan-upadhyay Aug 10, 2023
128fc43
Final presentation bugfixes (#55)
ishaan-upadhyay Aug 10, 2023
3532043
Add final presentation PDF
ishaan-upadhyay Aug 11, 2023
29c0924
docs(marking): apply s3 + s4 remarks
AryPat Aug 15, 2023
a1341a5
docs(marking): apply s4 remarks x2
AryPat Aug 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Why are you making these changes? 🔬

Please provide a description of the changes you made and the context driving them. Reference previous issues or PRs that help provide context.

### How did you test your changes? Are there any breaking changes? ✅

Before requesting a review, please make sure you've run the following commands to ensure that your current changes will build and deploy successfully. If your PR makes use of any API endpoints or adds new ones,
please use Postman or other API testing software to ensure the calls run as expected. If there are changes to an API endpoint that will cause requests to fail, please ensure you notify the relevant stakeholders.

**If you have the Vercel CLI installed**:
- `vercel build`

**If not**:
- `npm run build`
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
citrus/node_modules
citrus/.pnp
citrus/.pnp.js

# testing
/coverage

# next.js
citrus/.next/
citrus/out/

# production
citrus/build

# misc
citrus/.DS_Store
citrus/*.pem

# debug
citrus/npm-debug.log*
citrus/yarn-debug.log*
citrus/yarn-error.log*

# local env files
.env*.local
.env

# vercel
citrus/.vercel

# typescript
citrus/*.tsbuildinfo
citrus/next-env.d.ts
.vercel

#data
cockroach-data/
node_modules/

#VS Code files
*.code-workspace
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
args: ['--maxkb=1024']
- repo: local
hooks:
- id: regenerate-api-docs
name: regenerate-api-docs
entry: pre-commit-scripts/regenerate-api-docs.sh
language: script
5 changes: 5 additions & 0 deletions citrus/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DATABASE_URL=
GOOGLE_MAPS_API_KEY=
BASE_API_URL=
NEXTAUTH_SECRET=
NEXTAUTH_URL=
3 changes: 3 additions & 0 deletions citrus/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
34 changes: 34 additions & 0 deletions citrus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
54 changes: 54 additions & 0 deletions citrus/app/(organizers)/organizer/create/create.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.custom-heading {
font-size: 50px;
}

.custom-background {
background-color: rgb(1, 1, 32);
}

/* .custom-avatar {
width: 100px;
height: 100px;

} */

.custom-input {
border: 1px solid #ccc;
padding: 0.5rem;
border-radius: 4px;
margin-bottom: 1rem;
color: black;
}
.custom-box {
border: 1px solid #ccc;
padding: 1rem;
border-radius: 4px;
margin-bottom: 1rem;

/* height: 100%; */
}
.custom-acc-button {
border: 1px solid #ccc;
padding: 0.5rem;
border-radius: 4px;
}


/* .custom-box-content {
flex-grow: 1; /* Ensure the content expands to fill the box */
/* }

.custom-box-footer {
margin-top: 1rem; /* Add some space above the footer */







/* .custom-avatar-container {
display: flex;
justify-content: center;
align-items: center;
} */
6 changes: 6 additions & 0 deletions citrus/app/(organizers)/organizer/create/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import AddEvent from "@/components/AddEvent";


export default function Page() {
return <AddEvent />;
}
13 changes: 13 additions & 0 deletions citrus/app/(organizers)/organizer/dashboard/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import EditEvent from "@/components/EditEvent";
import { getServerSession } from "next-auth";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";

export default async function Page( {params}: { params: {id: string }}) {
const session = await getServerSession(authOptions);
const res = await fetch(process.env.BASE_API_URL + 'api/experiences/' + params.id);
const experience = await res.json();
if (experience.org_id !== session?.user?.name) {
return <h1>You are not authorized to edit this event.</h1>
}
return <EditEvent experience={experience} />
}
7 changes: 7 additions & 0 deletions citrus/app/(organizers)/organizer/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import EventCardHolder from "@/components/EventCardHolder";

export default function OrganizerDashboardPage() {
return (
<EventCardHolder />
);
}
101 changes: 101 additions & 0 deletions citrus/app/(organizers)/organizer/experiences/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCalendar, faLocationDot, faUser, faCircleInfo } from '@fortawesome/free-solid-svg-icons'
import EventButton from '@/components/EventButton';

async function getEventData(id: string) {
const res = await fetch(process.env.BASE_API_URL + `api/experiences/${id}`, { next: {revalidate: 0}});
const data = await res.json();
return data;
}

async function getOrganizerData(id: string, isUser: boolean) {;
if (isUser) {
const res = await fetch(process.env.BASE_API_URL + `api/users/${id}`);
const data = await res.json();
return data;
} else {
const res = await fetch(process.env.BASE_API_URL + `api/organizers/${id}`);
const data = await res.json();
return data;
}
}

function OrganizerCard( {organizer, isUser}: {organizer: any, isUser: boolean} ) {
if (isUser) {
return (
<div>
<p className='font-bold text-2xl'><FontAwesomeIcon icon={faCircleInfo} className='text-3xl text-blue-600' /> Organized by</p>
<p>This event was organized by the user {organizer.username}.</p>
</div>
)
}
return (
<div>
<p className='font-bold text-2xl'><FontAwesomeIcon icon={faCircleInfo} className='text-3xl text-blue-600' /> Organized by</p>
<p>This event was organized by the {organizer.org_id}.</p>
</div>
)
}

export default async function Page({ params }: { params: { id: string } }) {
const data = await getEventData(params.id);
const start_time = new Date(data.start);
const end_time = new Date(data.end);
const map_url = `https://www.google.com/maps/embed/v1/place?key=${process.env.GOOGLE_MAPS_API_KEY}&q=${data.location}`;
const organizer = await getOrganizerData(data.user_id || data.org_id, data.user_id != null);

return (
<div className="w-9/12 m-auto">
<h1 className="text-5xl text-bold">{data.name}</h1>
<div id="tags" className="flex my-5">
<p className="flex-none bg-blue-600 rounded-lg border-blue-200 border-2 px-4 mr-2 text-center">{data.category}</p>
{data.tags.map((tag: string) => (
<p key={tag} className="flex-none bg-violet-600 rounded-lg border-violet-200 border-2 px-4 mx-2 text-center">{tag}</p>
))}
</div>
<iframe id="map"
className="
w-full
h-96
border-none
rounded-lg"
loading="lazy"
allowFullScreen
referrerPolicy="no-referrer-when-downgrade"
src={map_url}>
</iframe>
<div className='flex flex-row space-x-20 justify-center my-5'>
<div>
<p className='font-bold text-2xl'><FontAwesomeIcon icon={faCalendar} className='text-3xl text-blue-600' /> When</p>
<p className=''>{start_time.toLocaleString([], {dateStyle: 'long', timeStyle: 'short'})} to <br></br>{end_time.toLocaleString([], {dateStyle: 'long', timeStyle: 'short'})}</p>
</div>
<div>
<p className='font-bold text-2xl'><FontAwesomeIcon icon={faLocationDot} className='text-3xl text-blue-600' /> Where </p>
<p className=''>{data.location}</p>
</div>
<div>
<p className='font-bold text-2xl'><FontAwesomeIcon icon={faUser} className='text-3xl text-blue-600' /> Spots left </p>
<p className=''>There are {data.capacity - data.attendees.length} spots left. </p>
<p>This event can host up to {data.capacity} people.</p>
</div>
<OrganizerCard organizer={organizer} isUser={data.user_id != null} />
</div>
<div>
<h2 className="text-3xl text-bold">Description</h2>
<p className="indent-8">{data.description}</p>
</div>
<div>
<h2 className="text-3xl text-bold">Users Attending</h2>
{
data.attendees == null || data.attendees.length == 0 ? (
<p className="indent-8">There seem to be no users currently attending this event.</p>
) : (
<ul className="indent-8">
{data.attendees.map((attendee: string) => <li key={attendee}> {attendee} </li>)}
</ul>
)
}
</div>
</div>
);
}
66 changes: 66 additions & 0 deletions citrus/app/(organizers)/organizer/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import '@/app/globals.css'
import '@fortawesome/fontawesome-svg-core/styles.css'
import { Inter } from 'next/font/google'
import Image from 'next/image'
import { getServerSession } from 'next-auth/next';
import NavBarLogin from '@/components/NavBarLogin'
import SessionProviderWrapper from '@/components/SessionProvider'
import { authOptions } from '@/app/api/auth/[...nextauth]/route';
import Link from 'next/link';

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Citrus',
description: 'A next-generation experience sharing platform.',
}

export default async function RootLayout({
children,
}: {
children: React.ReactNode
}) {
const session = await getServerSession(authOptions);
const correctUserType = (!session) || (session.user && session.user.userType !== 'user');

return (
<html lang="en">
<body className={'bg-black h-screen flex flex-col'}>
<SessionProviderWrapper session={session}>
<header className='flex h-min'>
<Image
src='/eventual_logo.svg'
alt='Citrus Logo'
width={200}
height={200}
/>
<nav className='ml-auto my-auto mr-10'>
<ul className='flex text-xl space-x-10'>
<li className='flex-1'>
<Link href="/organizer">Home</Link>
</li>
<li className='flex-1'>
<Link href="/organizer/dashboard">Dashboard</Link>
</li>
<li>
<Link href="/organizer/create">Create</Link>
</li>
<li>
<Link href="/organizer/signup">Sign Up</Link>
</li>
<NavBarLogin />
</ul>
</nav>
</header>
<div className='flex-1'>
{correctUserType ? children : <h1>You are not logged in as the correct type of user.</h1>}
</div>
<footer className='flex justify-center space-x-4 bg-blue-600
text-xl'>
<p>Test</p>
</footer>
</SessionProviderWrapper>
</body>
</html>
)
}
Loading