Remove old frontend

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-06-13 13:38:48 -07:00
parent 2adfe50054
commit d6ba8e1072
646 changed files with 671 additions and 78623 deletions

View File

@@ -0,0 +1,15 @@
import { useQuery, type UseQueryOptions } from "@tanstack/react-query";
/**
* Wrapper around useQuery to fetch data from an API endpoint
*/
export function useFetchQuery<T>(
url: string,
options?: Omit<UseQueryOptions<T>, "queryKey" | "queryFn">
) {
return useQuery<T>({
...options,
queryKey: [url],
queryFn: () => fetch(url).then((res) => res.json()),
});
}