fix some type errors

This commit is contained in:
2024-05-14 19:07:41 +02:00
parent 8c6c58b62f
commit 08b2e5387d
6 changed files with 189 additions and 42 deletions

View File

@ -3,7 +3,7 @@ import { EventContainer } from "@/components/events/EventContainer";
import {
allEventsQuery,
EventFragment,
EventCategoryFragment,
EventCategory,
EventOccurrence,
} from "@/lib/event";
import { PageHeader } from "@/components/general/PageHeader";
@ -11,8 +11,7 @@ import { PageHeader } from "@/components/general/PageHeader";
export default async function Page() {
const { data, error } = await getClient().query(allEventsQuery, {});
const events = (data?.events ?? []) as EventFragment[];
const eventCategories = (data?.eventCategories ??
[]) as EventCategoryFragment[];
const eventCategories = (data?.eventCategories ?? []) as EventCategory[];
return (
<main className="site-main" id="main">

View File

@ -5,7 +5,7 @@ import { EventItem } from "./EventItem";
import { EventFilter } from "./EventFilter";
import {
EventFragment,
EventCategoryFragment,
EventCategory,
SingularEvent,
getSingularEvents,
organizeEventsByDate,
@ -24,7 +24,7 @@ export const EventContainer = ({
eventCategories,
}: {
events: EventFragment[];
eventCategories: EventCategoryFragment[];
eventCategories: EventCategory[];
}) => {
const [mode, setMode] = useQueryState(
"mode",
@ -32,18 +32,21 @@ export const EventContainer = ({
);
const filterableCategories = eventCategories.filter((x) => x.showInFilters);
const filterableCategorySlugs: string[] = filterableCategories
.filter((x) => "slug" in x && typeof x.slug === "string")
.map((x) => x.slug);
const [category, setCategory] = useQueryState(
"category",
parseAsStringLiteral(filterableCategories.map((x) => x.slug)).withDefault(
null
)
parseAsStringLiteral(filterableCategorySlugs).withDefault(null)
);
const filteredEvents = events.filter(
(x) =>
!category ||
x.categories
?.map((eventCategory) => eventCategory.slug)
?.filter((x) => x !== null)
.map((eventCategory: EventCategory) => eventCategory.slug)
.includes(category)
);

View File

@ -1,4 +1,4 @@
import { EventFragment } from "@/gql/graphql";
import { EventCategory, EventFragment } from "@/lib/event";
import styles from "./eventHeader.module.scss";
import Image from "@/components/general/Image";
import { Pig } from "../general/Pig";
@ -16,7 +16,11 @@ export const EventHeader = ({ event }: { event: EventFragment }) => {
<div>Medlemspris: {event.priceMember}</div>
<div>
Kategorier:{" "}
{event.categories && event.categories.map((x) => x.name).join(", ")}
{event.categories &&
event.categories
.filter((x) => x != null)
.map((x: EventCategoryFragment) => x.name)
.join(", ")}
</div>
</div>
</div>

View File

@ -6,9 +6,9 @@ export const NewsList = ({
featured,
limit,
}: {
heading: string;
featured: boolean;
limit: number;
heading?: string;
featured?: boolean;
limit?: number;
}) => {
return (
<section className={styles.newsWrapper}>

View File

@ -36,12 +36,13 @@ export type Scalars = {
UUID: { input: any; output: any; }
};
export type Association = PageInterface & {
__typename?: 'Association';
export type AssociationIndex = PageInterface & {
__typename?: 'AssociationIndex';
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
depth?: Maybe<Scalars['Int']['output']>;
@ -84,7 +85,7 @@ export type Association = PageInterface & {
};
export type AssociationAncestorsArgs = {
export type AssociationIndexAncestorsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -93,7 +94,7 @@ export type AssociationAncestorsArgs = {
};
export type AssociationChildrenArgs = {
export type AssociationIndexChildrenArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -102,7 +103,7 @@ export type AssociationChildrenArgs = {
};
export type AssociationDescendantsArgs = {
export type AssociationIndexDescendantsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -111,7 +112,7 @@ export type AssociationDescendantsArgs = {
};
export type AssociationNextSiblingsArgs = {
export type AssociationIndexNextSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -120,7 +121,7 @@ export type AssociationNextSiblingsArgs = {
};
export type AssociationPreviousSiblingsArgs = {
export type AssociationIndexPreviousSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -129,7 +130,109 @@ export type AssociationPreviousSiblingsArgs = {
};
export type AssociationSiblingsArgs = {
export type AssociationIndexSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type AssociationPage = PageInterface & {
__typename?: 'AssociationPage';
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
depth?: Maybe<Scalars['Int']['output']>;
descendants: Array<PageInterface>;
draftTitle: Scalars['String']['output'];
eventindex?: Maybe<EventIndex>;
eventpage?: Maybe<EventPage>;
expireAt?: Maybe<Scalars['DateTime']['output']>;
expired: Scalars['Boolean']['output'];
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
genericpage?: Maybe<GenericPage>;
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
hasUnpublishedChanges: Scalars['Boolean']['output'];
homepage?: Maybe<HomePage>;
id?: Maybe<Scalars['ID']['output']>;
lastPublishedAt?: Maybe<Scalars['DateTime']['output']>;
latestRevisionCreatedAt?: Maybe<Scalars['DateTime']['output']>;
live: Scalars['Boolean']['output'];
locked?: Maybe<Scalars['Boolean']['output']>;
lockedAt?: Maybe<Scalars['DateTime']['output']>;
nextSiblings: Array<PageInterface>;
numchild: Scalars['Int']['output'];
pageType?: Maybe<Scalars['String']['output']>;
parent?: Maybe<PageInterface>;
path: Scalars['String']['output'];
previousSiblings: Array<PageInterface>;
searchDescription?: Maybe<Scalars['String']['output']>;
searchScore?: Maybe<Scalars['Float']['output']>;
seoTitle: Scalars['String']['output'];
showInMenus: Scalars['Boolean']['output'];
siblings: Array<PageInterface>;
sitesRootedHere: Array<SiteObjectType>;
slug: Scalars['String']['output'];
title: Scalars['String']['output'];
translationKey: Scalars['UUID']['output'];
url?: Maybe<Scalars['String']['output']>;
urlPath: Scalars['String']['output'];
venueindex?: Maybe<VenueIndex>;
venuepage?: Maybe<VenuePage>;
};
export type AssociationPageAncestorsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type AssociationPageChildrenArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type AssociationPageDescendantsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type AssociationPageNextSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type AssociationPagePreviousSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type AssociationPageSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -289,7 +392,8 @@ export type EventIndex = PageInterface & {
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
depth?: Maybe<Scalars['Int']['output']>;
@ -393,12 +497,18 @@ export type EventOccurrence = {
venue?: Maybe<VenuePage>;
};
export type EventOrganizer = {
__typename?: 'EventOrganizer';
id?: Maybe<Scalars['ID']['output']>;
};
export type EventPage = PageInterface & {
__typename?: 'EventPage';
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
body?: Maybe<Array<Maybe<StreamFieldInterface>>>;
categories?: Maybe<Array<Maybe<EventCategory>>>;
children: Array<PageInterface>;
@ -426,6 +536,7 @@ export type EventPage = PageInterface & {
nextSiblings: Array<PageInterface>;
numchild: Scalars['Int']['output'];
occurrences?: Maybe<Array<Maybe<EventOccurrence>>>;
organizers?: Maybe<Array<Maybe<EventOrganizer>>>;
pageType?: Maybe<Scalars['String']['output']>;
parent?: Maybe<PageInterface>;
path: Scalars['String']['output'];
@ -504,6 +615,15 @@ export type EventPageOccurrencesArgs = {
};
export type EventPageOrganizersArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type EventPagePreviousSiblingsArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
@ -535,7 +655,8 @@ export type GenericPage = PageInterface & {
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
body?: Maybe<Array<Maybe<StreamFieldInterface>>>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
@ -637,7 +758,8 @@ export type HomePage = PageInterface & {
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
depth?: Maybe<Scalars['Int']['output']>;
@ -832,7 +954,8 @@ export type Page = PageInterface & {
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
depth?: Maybe<Scalars['Int']['output']>;
@ -1049,6 +1172,8 @@ export type Query = {
documents: Array<DocumentObjectType>;
eventCategories?: Maybe<Array<Maybe<EventCategory>>>;
eventCategory?: Maybe<EventCategory>;
eventOrganizer?: Maybe<EventOrganizer>;
eventOrganizers?: Maybe<Array<Maybe<EventOrganizer>>>;
image?: Maybe<ImageObjectType>;
imageType: Scalars['String']['output'];
images: Array<ImageObjectType>;
@ -1100,6 +1225,20 @@ export type QueryEventCategoryArgs = {
};
export type QueryEventOrganizerArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
};
export type QueryEventOrganizersArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
order?: InputMaybe<Scalars['String']['input']>;
searchQuery?: InputMaybe<Scalars['String']['input']>;
};
export type QueryImageArgs = {
id?: InputMaybe<Scalars['ID']['input']>;
};
@ -1209,7 +1348,7 @@ export type RichTextBlock = StreamFieldInterface & {
value: Scalars['String']['output'];
};
export type Search = Association | EventCategory | EventIndex | EventOccurrence | EventPage | GenericPage | HomePage | Page | VenueIndex | VenuePage;
export type Search = AssociationIndex | AssociationPage | EventCategory | EventIndex | EventOccurrence | EventOrganizer | EventPage | GenericPage | HomePage | Page | VenueIndex | VenuePage;
export type SiteObjectType = {
__typename?: 'SiteObjectType';
@ -1331,7 +1470,8 @@ export type VenueIndex = PageInterface & {
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
children: Array<PageInterface>;
contentType: Scalars['String']['output'];
depth?: Maybe<Scalars['Int']['output']>;
@ -1432,7 +1572,8 @@ export type VenuePage = PageInterface & {
aliasOf?: Maybe<Page>;
aliases: Array<Page>;
ancestors: Array<PageInterface>;
association?: Maybe<Association>;
associationindex?: Maybe<AssociationIndex>;
associationpage?: Maybe<AssociationPage>;
body?: Maybe<Array<Maybe<StreamFieldInterface>>>;
capabilityAudio?: Maybe<Scalars['String']['output']>;
capabilityAudioVideo?: Maybe<Scalars['String']['output']>;
@ -1545,14 +1686,14 @@ export type GenericFragment = { __typename: 'GenericPage', id?: string | null, u
export type AllGenericSlugsQueryVariables = Exact<{ [key: string]: never; }>;
export type AllGenericSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, urlPath: string } | { __typename?: 'EventIndex', id?: string | null, urlPath: string } | { __typename?: 'EventPage', id?: string | null, urlPath: string } | { __typename?: 'GenericPage', id?: string | null, urlPath: string } | { __typename?: 'HomePage', id?: string | null, urlPath: string } | { __typename?: 'Page', id?: string | null, urlPath: string } | { __typename?: 'VenueIndex', id?: string | null, urlPath: string } | { __typename?: 'VenuePage', id?: string | null, urlPath: string }> };
export type AllGenericSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'AssociationIndex', id?: string | null, urlPath: string } | { __typename?: 'AssociationPage', id?: string | null, urlPath: string } | { __typename?: 'EventIndex', id?: string | null, urlPath: string } | { __typename?: 'EventPage', id?: string | null, urlPath: string } | { __typename?: 'GenericPage', id?: string | null, urlPath: string } | { __typename?: 'HomePage', id?: string | null, urlPath: string } | { __typename?: 'Page', id?: string | null, urlPath: string } | { __typename?: 'VenueIndex', id?: string | null, urlPath: string } | { __typename?: 'VenuePage', id?: string | null, urlPath: string }> };
export type GenericPageByUrlQueryVariables = Exact<{
urlPath: Scalars['String']['input'];
}>;
export type GenericPageByUrlQuery = { __typename?: 'Query', page?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | (
export type GenericPageByUrlQuery = { __typename?: 'Query', page?: { __typename?: 'AssociationIndex' } | { __typename?: 'AssociationPage' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | (
{ __typename?: 'GenericPage' }
& { ' $fragmentRefs'?: { 'GenericFragment': GenericFragment } }
) | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' } | null };
@ -1560,14 +1701,14 @@ export type GenericPageByUrlQuery = { __typename?: 'Query', page?: { __typename?
export type AllEventSlugsQueryVariables = Exact<{ [key: string]: never; }>;
export type AllEventSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'GenericPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
export type AllEventSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'AssociationIndex', id?: string | null, slug: string } | { __typename?: 'AssociationPage', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'GenericPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
export type EventBySlugQueryVariables = Exact<{
slug: Scalars['String']['input'];
}>;
export type EventBySlugQuery = { __typename?: 'Query', event?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | (
export type EventBySlugQuery = { __typename?: 'Query', event?: { __typename?: 'AssociationIndex' } | { __typename?: 'AssociationPage' } | { __typename?: 'EventIndex' } | (
{ __typename?: 'EventPage' }
& { ' $fragmentRefs'?: { 'EventFragment': EventFragment } }
) | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' } | null };
@ -1575,14 +1716,14 @@ export type EventBySlugQuery = { __typename?: 'Query', event?: { __typename?: 'A
export type AllVenueSlugsQueryVariables = Exact<{ [key: string]: never; }>;
export type AllVenueSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'GenericPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
export type AllVenueSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'AssociationIndex', id?: string | null, slug: string } | { __typename?: 'AssociationPage', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'GenericPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
export type VenueBySlugQueryVariables = Exact<{
slug: Scalars['String']['input'];
}>;
export type VenueBySlugQuery = { __typename?: 'Query', venue?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
export type VenueBySlugQuery = { __typename?: 'Query', venue?: { __typename?: 'AssociationIndex' } | { __typename?: 'AssociationPage' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
{ __typename?: 'VenuePage' }
& { ' $fragmentRefs'?: { 'VenueFragment': VenueFragment } }
) | null };
@ -1592,7 +1733,7 @@ export type VenueFragment = { __typename: 'VenuePage', id?: string | null, slug:
export type AllVenuesQueryVariables = Exact<{ [key: string]: never; }>;
export type AllVenuesQuery = { __typename?: 'Query', venues: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
export type AllVenuesQuery = { __typename?: 'Query', venues: Array<{ __typename?: 'AssociationIndex' } | { __typename?: 'AssociationPage' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
{ __typename?: 'VenuePage' }
& { ' $fragmentRefs'?: { 'VenueFragment': VenueFragment } }
)> };
@ -1600,7 +1741,7 @@ export type AllVenuesQuery = { __typename?: 'Query', venues: Array<{ __typename?
export type HomeQueryVariables = Exact<{ [key: string]: never; }>;
export type HomeQuery = { __typename?: 'Query', events: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | (
export type HomeQuery = { __typename?: 'Query', events: Array<{ __typename?: 'AssociationIndex' } | { __typename?: 'AssociationPage' } | { __typename?: 'EventIndex' } | (
{ __typename?: 'EventPage' }
& { ' $fragmentRefs'?: { 'EventFragment': EventFragment } }
) | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' }> };
@ -1610,7 +1751,7 @@ export type EventFragment = { __typename: 'EventPage', id?: string | null, slug:
export type AllEventsQueryVariables = Exact<{ [key: string]: never; }>;
export type AllEventsQuery = { __typename?: 'Query', events: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | (
export type AllEventsQuery = { __typename?: 'Query', events: Array<{ __typename?: 'AssociationIndex' } | { __typename?: 'AssociationPage' } | { __typename?: 'EventIndex' } | (
{ __typename?: 'EventPage' }
& { ' $fragmentRefs'?: { 'EventFragment': EventFragment } }
) | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' }>, eventCategories?: Array<{ __typename?: 'EventCategory', name?: string | null, slug?: string | null, showInFilters?: boolean | null } | null> | null };

View File

@ -12,13 +12,13 @@ import { toLocalTime, formatDate } from "./date";
import { graphql } from "@/gql";
import {
EventFragment,
EventCategoryFragment,
EventCategory,
EventOccurrence,
} from "@/gql/graphql";
export type {
EventFragment,
EventCategoryFragment,
EventCategory,
EventOccurrence,
} from "@/gql/graphql";