Skip to content

Commit d1ce959

Browse files
updated useEvents hook to return an array of Tags
1 parent c170f5e commit d1ce959

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

client/src/hooks/events.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
22

33
import api from "../lib/api";
44

5-
export type Event = {
5+
export interface Tag {
6+
id: number;
7+
name: string;
8+
}
9+
export interface Event {
610
id: number;
711
event_name: string;
812
event_description: string;
913
event_date: string;
1014
event_location: string;
11-
};
15+
tags: Tag[];
16+
}
1217

1318
// hook to fetch events list
1419
export const useEvents = (

0 commit comments

Comments
 (0)