kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
UI: remove QueryClient (it's already in containers/soapbox, how did that happen?)
rodzic
d7243c0e91
commit
23bbaf329b
|
@ -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';
|
||||||
|
@ -10,7 +9,6 @@ import { Switch, useHistory, useLocation, Redirect } from 'react-router-dom';
|
||||||
import { fetchFollowRequests } from 'soapbox/actions/accounts';
|
import { fetchFollowRequests } from 'soapbox/actions/accounts';
|
||||||
import { fetchReports, fetchUsers, fetchConfig } from 'soapbox/actions/admin';
|
import { fetchReports, fetchUsers, fetchConfig } from 'soapbox/actions/admin';
|
||||||
import { fetchAnnouncements } from 'soapbox/actions/announcements';
|
import { fetchAnnouncements } from 'soapbox/actions/announcements';
|
||||||
import { fetchChats } from 'soapbox/actions/chats';
|
|
||||||
import { uploadCompose, resetCompose } from 'soapbox/actions/compose';
|
import { uploadCompose, resetCompose } from 'soapbox/actions/compose';
|
||||||
import { fetchCustomEmojis } from 'soapbox/actions/custom_emojis';
|
import { fetchCustomEmojis } from 'soapbox/actions/custom_emojis';
|
||||||
import { fetchFilters } from 'soapbox/actions/filters';
|
import { fetchFilters } from 'soapbox/actions/filters';
|
||||||
|
@ -120,7 +118,6 @@ import { WrappedRoute } from './util/react_router_helpers';
|
||||||
// Dummy import, to make sure that <Status /> ends up in the application bundle.
|
// Dummy import, to make sure that <Status /> ends up in the application bundle.
|
||||||
// Without this it ends up in ~8 very commonly used bundles.
|
// Without this it ends up in ~8 very commonly used bundles.
|
||||||
import 'soapbox/components/status';
|
import 'soapbox/components/status';
|
||||||
import { queryClient } from 'soapbox/queries/client';
|
|
||||||
|
|
||||||
const EmptyPage = HomePage;
|
const EmptyPage = HomePage;
|
||||||
|
|
||||||
|
@ -654,53 +651,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={ChatWidget}>
|
|
||||||
{Component => <Component />}
|
|
||||||
</BundleContainer>
|
|
||||||
)}
|
|
||||||
<ThumbNavigation />
|
|
||||||
|
|
||||||
<BundleContainer fetchComponent={ProfileHoverCard}>
|
|
||||||
{Component => <Component />}
|
{Component => <Component />}
|
||||||
</BundleContainer>
|
</BundleContainer>
|
||||||
|
)}
|
||||||
<BundleContainer fetchComponent={StatusHoverCard}>
|
{me && features.chats && !mobile && (
|
||||||
|
<BundleContainer fetchComponent={ChatWidget}>
|
||||||
{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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue