Files
stats/apps/web/src/hooks/useEventNames.ts
Carl-Gerhard Lindesvärd 308ae98472 migrate to app dir and ssr
2024-01-20 22:54:38 +01:00

13 lines
293 B
TypeScript

import { api } from '@/app/_trpc/client';
export function useEventNames(projectId: string) {
const filterEventsQuery = api.chart.events.useQuery({
projectId: projectId,
});
return (filterEventsQuery.data ?? []).map((item) => ({
value: item.name,
label: item.name,
}));
}