1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 15:14:23 +00:00
festa/hooks/swr/useEventDetailsSWR.ts

7 lines
183 B
TypeScript
Raw Normal View History

2022-06-03 02:10:51 +00:00
import { Event } from "@prisma/client";
import { default as useSWR } from "swr";
export function useEventDetailsSWR(slug: string) {
return useSWR<Event>(`/api/events/${slug}`)
}