Implemented the new react version of the frontend

This commit is contained in:
Mohammed Abad committed 2026-03-31 01:56:38 +01:00
1 parent 236e6e06fb
commit ffe7e52527
65 files changed
+5228 -177

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { useQuery } from '@tanstack/react-query';
import { peopleApi } from '@/api/people';
export const peopleKeys = {
all: ['people'] as const,
detail: (id: number) => ['people', id] as const,
};
export function usePerson(id: number) {
return useQuery({
queryKey: peopleKeys.detail(id),
queryFn: () => peopleApi.getById(id),
enabled: !!id,
});
}