1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Don't use devtools on the TV as the navigation is weird

This commit is contained in:
Dmitry Lyzo 2024-09-05 21:21:41 +03:00
parent ea27750d7d
commit 0fbfda882d

View file

@ -5,10 +5,14 @@ import React from 'react';
import { ApiProvider } from 'hooks/useApi';
import { UserSettingsProvider } from 'hooks/useUserSettings';
import { WebConfigProvider } from 'hooks/useWebConfig';
import browser from 'scripts/browser';
import { queryClient } from 'utils/query/queryClient';
import RootAppRouter from 'RootAppRouter';
const useReactQueryDevtools = window.Proxy // '@tanstack/query-devtools' requires 'Proxy', which cannot be polyfilled for legacy browsers
&& !browser.tv; // Don't use devtools on the TV as the navigation is weird
const RootApp = () => (
<QueryClientProvider client={queryClient}>
<ApiProvider>
@ -18,7 +22,7 @@ const RootApp = () => (
</WebConfigProvider>
</UserSettingsProvider>
</ApiProvider>
{window.Proxy && ( // '@tanstack/query-devtools' requires 'Proxy', which cannot be polyfilled for legacy browsers
{useReactQueryDevtools && (
<ReactQueryDevtools initialIsOpen={false} />
)}
</QueryClientProvider>