mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-07 06:43:29 +00:00
* prototype * `.normalise` helper + only `String` keys * implement it for 'search.paths' * redux devtools * fix * refactor backend * wip: upgrade to rspc fork * mega cursed * Upgrade Specta-related stuff * Upgrade Typescript * Cache debug page * bruh * Fix optimistic library setting * Cache clearing * better timeout * Fix tags page * bit of cleanup --------- Co-authored-by: Brendan Allan <brendonovich@outlook.com>
25 lines
681 B
TypeScript
25 lines
681 B
TypeScript
import { defaultContext } from '@tanstack/react-query';
|
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
|
import { useDebugState } from '@sd/client';
|
|
|
|
export const Devtools = () => {
|
|
const debugState = useDebugState();
|
|
|
|
return (
|
|
<>
|
|
{debugState.reactQueryDevtools !== 'disabled' ? (
|
|
<ReactQueryDevtools
|
|
position="bottom-right"
|
|
// The `context={defaultContext}` part is required for this to work on Windows.
|
|
// Why, idk, don't question it
|
|
context={defaultContext}
|
|
toggleButtonProps={{
|
|
tabIndex: -1,
|
|
className: debugState.reactQueryDevtools === 'invisible' ? 'opacity-0' : ''
|
|
}}
|
|
/>
|
|
) : null}
|
|
</>
|
|
);
|
|
};
|