fix: WEBSITE_SHOW_VERSION=false works now (#450)

This commit is contained in:
diced
2023-08-29 15:33:20 -07:00
parent 72e24a8b86
commit 5d6768029f

View File

@@ -15,10 +15,12 @@ export const useVersion = () => {
return useQuery<VersionResponse>(
['version'],
async () => {
return fetch('/api/version').then((res) => res.json());
return fetch('/api/version').then((res) => (res.ok ? res.json() : Promise.reject('')));
},
{
staleTime: Infinity,
refetchInterval: false,
refetchOnMount: false,
retry: false,
}
);
};