diff --git a/app/(transition)/(root)/events/[id]/page.tsx b/app/(transition)/(root)/events/[id]/page.tsx index 779e816..0826019 100644 --- a/app/(transition)/(root)/events/[id]/page.tsx +++ b/app/(transition)/(root)/events/[id]/page.tsx @@ -1,3 +1,5 @@ +import { gql } from "@apollo/client"; +import { getApolloClient } from "@/api/ApolloClient"; import { MapPinIcon } from "@heroicons/react/24/outline"; import { Attendees } from "@/components/Event/Attendees/Attendees"; import { Hero } from "@/components/Event/Hero/Hero"; @@ -5,11 +7,31 @@ import { Information } from "@/components/Event/Information/Information"; import { Location } from "@/components/Event/Location/Location"; import { Organizers } from "@/components/Event/Organizers/Organizers"; import { Register } from "@/components/Event/Register/Register"; +import { FetchExampleEventsQuery } from "@/api/gql/graphql"; // TODO: Mock data, remove after connect this page with GraphQL service import { event } from "./fixture"; -export default function Event() { +type Props = { + searchParams: { [key: string]: string | string[] | undefined }; +}; + +export default async function Event({ searchParams }: Props) { + const c = getApolloClient(); + const { id } = searchParams; + + const response = await c.query({ + query: gql` + { + event(id: "${id}") { + name + } + } + `, + }); + + console.log({ response }); + const { name, organizer, diff --git a/src/components/Event/Information/Information.tsx b/src/components/Event/Information/Information.tsx index dc3d020..f1b8822 100644 --- a/src/components/Event/Information/Information.tsx +++ b/src/components/Event/Information/Information.tsx @@ -3,6 +3,8 @@ import Markdown from "react-markdown"; import remarkGfm from "remark-gfm"; import { InformationTypes } from "./types"; +const remarkPlugins = [remarkGfm]; + export const Information: FC = ({ title, information, @@ -18,7 +20,7 @@ export const Information: FC = ({ {information} diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index 8cb7bbd..23c4f06 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -13,9 +13,9 @@ const SheetTrigger = SheetPrimitive.Trigger; const SheetClose = SheetPrimitive.Close; -const SheetPortal = ({ - ...props -}: SheetPrimitive.DialogPortalProps) => ; +const SheetPortal = ({ ...props }: SheetPrimitive.DialogPortalProps) => ( + +); SheetPortal.displayName = SheetPrimitive.Portal.displayName; const SheetOverlay = React.forwardRef<