Profile
- Name: {userData.name}
+ Name: {session?.user.name}
- Email: {userData.email}
+ Email: {session?.user.email}
diff --git a/frontend/pages/app/search.tsx b/frontend/pages/app/search.tsx
index 13ca570..fada599 100644
--- a/frontend/pages/app/search.tsx
+++ b/frontend/pages/app/search.tsx
@@ -5,40 +5,83 @@ import { Button, Group, MultiSelect, TextInput } from "@mantine/core";
import { useState } from "react";
import { YearPickerInput } from "@mantine/dates";
import ImageWithModal from "@/components/ImageWithModal";
+import { prisma } from "../api/auth/[...nextauth]";
+import { InferGetServerSidePropsType } from "next";
-// TODO: Make the UI better for larger screens
-export default function Search() {
+type Event = {
+ value: string;
+ label: string;
+};
+
+export const getServerSideProps = async () => {
+ const events = await prisma.event.findMany({
+ where: { year: new Date().getFullYear() },
+ });
+
+ return {
+ props: {
+ initialLoadEvents: events.map((event) => ({
+ value: event.id,
+ label: event.name,
+ })),
+ },
+ };
+};
+
+export default function Search({
+ initialLoadEvents,
+}: InferGetServerSidePropsType