diff --git a/src/app/_components/CompanyRegistrationButton.tsx b/src/app/_components/CompanyRegistrationButton.tsx index 76086c9..b5f74f3 100644 --- a/src/app/_components/CompanyRegistrationButton.tsx +++ b/src/app/_components/CompanyRegistrationButton.tsx @@ -1,7 +1,17 @@ +import { P } from "@/app/_components/Paragraph" +import { fetchDates } from "@/components/shared/hooks/api/useDates" import { Button } from "@/components/ui/button" +import { DateTime } from "luxon" import Link from "next/link" -export function CompanyRegistrationButton() { +export async function CompanyRegistrationButton() { + const { fr } = await fetchDates() + const isAfterFr = DateTime.now() > DateTime.fromISO(fr.end) + + if (isAfterFr) { + return
{DateTime.now().year} signup is closed
+ } + return ( diff --git a/src/app/exhibitor/layout.tsx b/src/app/exhibitor/layout.tsx index 9787469..cd17262 100644 --- a/src/app/exhibitor/layout.tsx +++ b/src/app/exhibitor/layout.tsx @@ -1,23 +1,16 @@ +import { CompanyRegistrationButton } from "@/app/_components/CompanyRegistrationButton" import { CompanySubmissionPopover } from "@/app/exhibitor/_components/CompanySubmissionPopover" import { NavigationMenu } from "@/components/shared/NavigationMenu" -import { Button } from "@/components/ui/button" import { Toaster } from "@/components/ui/sonner" -import Link from "next/link" -export default function ExhibitorLayout({ +export default async function ExhibitorLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( <> -