Throw out unnedeed QueryClientProvider changes

This commit is contained in:
Alex Gleason 2022-08-09 11:07:45 -05:00
parent 28d5461295
commit 5f2532c3d7
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 34 additions and 39 deletions

View File

@ -81,7 +81,6 @@ const loadInitial = () => {
/** Highest level node with the Redux store. */ /** Highest level node with the Redux store. */
const SoapboxMount = () => { const SoapboxMount = () => {
useCachedLocationHandler(); useCachedLocationHandler();
const me = useAppSelector(state => state.me); const me = useAppSelector(state => state.me);
const instance = useAppSelector(state => state.instance); const instance = useAppSelector(state => state.instance);
const account = useOwnAccount(); const account = useOwnAccount();

View File

@ -1,6 +1,5 @@
'use strict'; 'use strict';
import { QueryClientProvider } from '@tanstack/react-query';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import React, { useState, useEffect, useRef, useCallback } from 'react'; import React, { useState, useEffect, useRef, useCallback } from 'react';
import { HotKeys } from 'react-hotkeys'; import { HotKeys } from 'react-hotkeys';
@ -36,7 +35,6 @@ import HomePage from 'soapbox/pages/home_page';
import ProfilePage from 'soapbox/pages/profile_page'; import ProfilePage from 'soapbox/pages/profile_page';
import RemoteInstancePage from 'soapbox/pages/remote_instance_page'; import RemoteInstancePage from 'soapbox/pages/remote_instance_page';
import StatusPage from 'soapbox/pages/status_page'; import StatusPage from 'soapbox/pages/status_page';
import { queryClient } from 'soapbox/queries/client';
import { getAccessToken, getVapidKey } from 'soapbox/utils/auth'; import { getAccessToken, getVapidKey } from 'soapbox/utils/auth';
import { isStandalone } from 'soapbox/utils/state'; import { isStandalone } from 'soapbox/utils/state';
// import GroupSidebarPanel from '../groups/sidebar_panel'; // import GroupSidebarPanel from '../groups/sidebar_panel';
@ -650,53 +648,51 @@ const UI: React.FC = ({ children }) => {
}; };
return ( return (
<QueryClientProvider client={queryClient}> <HotKeys keyMap={keyMap} handlers={me ? handlers : undefined} ref={setHotkeysRef} attach={window} focused>
<HotKeys keyMap={keyMap} handlers={me ? handlers : undefined} ref={setHotkeysRef} attach={window} focused> <div ref={node} style={style}>
<div ref={node} style={style}> <BackgroundShapes />
<BackgroundShapes />
<div className='z-10 flex flex-col'> <div className='z-10 flex flex-col'>
<Navbar /> <Navbar />
<Layout> <Layout>
<Layout.Sidebar> <Layout.Sidebar>
{!standalone && <SidebarNavigation />} {!standalone && <SidebarNavigation />}
</Layout.Sidebar> </Layout.Sidebar>
<SwitchingColumnsArea> <SwitchingColumnsArea>
{children} {children}
</SwitchingColumnsArea> </SwitchingColumnsArea>
</Layout> </Layout>
{me && floatingActionButton} {me && floatingActionButton}
<BundleContainer fetchComponent={UploadArea}> <BundleContainer fetchComponent={UploadArea}>
{Component => <Component active={draggingOver} onClose={closeUploadModal} />} {Component => <Component active={draggingOver} onClose={closeUploadModal} />}
</BundleContainer> </BundleContainer>
{me && ( {me && (
<BundleContainer fetchComponent={SidebarMenu}> <BundleContainer fetchComponent={SidebarMenu}>
{Component => <Component />}
</BundleContainer>
)}
{me && features.chats && !mobile && (
<BundleContainer fetchComponent={ChatPanes}>
{Component => <Component />}
</BundleContainer>
)}
<ThumbNavigation />
<BundleContainer fetchComponent={ProfileHoverCard}>
{Component => <Component />} {Component => <Component />}
</BundleContainer> </BundleContainer>
)}
<BundleContainer fetchComponent={StatusHoverCard}> {me && features.chats && !mobile && (
<BundleContainer fetchComponent={ChatPanes}>
{Component => <Component />} {Component => <Component />}
</BundleContainer> </BundleContainer>
</div> )}
<ThumbNavigation />
<BundleContainer fetchComponent={ProfileHoverCard}>
{Component => <Component />}
</BundleContainer>
<BundleContainer fetchComponent={StatusHoverCard}>
{Component => <Component />}
</BundleContainer>
</div> </div>
</HotKeys> </div>
</QueryClientProvider> </HotKeys>
); );
}; };