Skip to content

Commit

Permalink
fix: category types & schema (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
OverGlass authored Jan 15, 2025
1 parent 58d6dee commit 5b37e2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/components/Events/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { VisibilityEvent, EventGroupCategory } from '~/domain/event'
export interface Category {
slug: string
name: string
description: string
event_group_category: EventGroupCategory
alert: string
description: string | null
event_group_category?: EventGroupCategory
alert: string | null
}

export interface Event {
Expand Down
9 changes: 2 additions & 7 deletions src/domain/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,8 @@ export enum VisibilityEvent {
export const EventCategorySchema = z.object({
name: z.string(),
slug: z.string(),
description: z.string(),
alert: z.string(),
event_group_category: z.object({
name: z.string(),
slug: z.string(),
description: z.string(),
}),
description: z.string().nullable(),
alert: z.string().nullable(),
})

export const CreateEventSchema = z
Expand Down

0 comments on commit 5b37e2c

Please sign in to comment.