diff --git a/src/app/_components/FairDates.tsx b/src/app/_components/FairDates.tsx new file mode 100644 index 0000000..6e8c781 --- /dev/null +++ b/src/app/_components/FairDates.tsx @@ -0,0 +1,26 @@ +import { fetchDates } from "@/components/shared/hooks/api/useDates" +import { DateTime } from "luxon" + +export async function FairDates() { + const dates = await fetchDates() + + return ( +
Fair:
++ {DateTime.fromISO(date).toFormat( + // Only add month and year to last + `d${index == list.length - 1 ? " MMM" : "-"}${DateTime.fromISO(date).year !== DateTime.now().year ? " YYYY" : ""}` + )} +
+ ))} +Fair:
-- {DateTime.fromISO(date).toFormat( - // Only add month and year to last - `d${index == list.length - 1 ? " MMM" : "-"}${DateTime.fromISO(date).year !== DateTime.now().year ? " YYYY" : ""}` - )} -
- ))} -Loading...
if (data == null) { diff --git a/src/app/team/page.tsx b/src/app/team/page.tsx index 07edab0..20e5310 100644 --- a/src/app/team/page.tsx +++ b/src/app/team/page.tsx @@ -12,7 +12,9 @@ export const metadata: Metadata = { } export default async function TeamPage() { - const organization = await fetchOrganization() + const organization = await fetchOrganization({ + cache: "no-cache" + }) return (