mirror of
https://github.com/diced/zipline.git
synced 2026-01-16 06:43:11 -08:00
fix: WEBSITE_SHOW_VERSION=false works now (#450)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user