fix: a bunch of random stuff

This commit is contained in:
diced 2024-12-20 00:07:33 -08:00
parent dcb4a4e9e7
commit 12fcff1a14
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
82 changed files with 9015 additions and 5875 deletions

View file

@ -25,9 +25,6 @@ const fetcher = async ([url, options]: [string, ApiStatsOptions]) => {
};
export function useApiStats(options: ApiStatsOptions = {}) {
if (!options.from && !options.to)
return { data: undefined, error: undefined, isLoading: false, mutate: () => {} };
const { data, error, isLoading, mutate } = useSWR<Response['/api/stats']>(['/api/stats', options], {
fetcher,
});