From 23bbaf329b126122d3a5855b9a13e44e615a3f37 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 19 Sep 2022 13:04:51 -0500 Subject: [PATCH] UI: remove QueryClient (it's already in containers/soapbox, how did that happen?) --- app/soapbox/features/ui/index.tsx | 73 ++++++++++++++----------------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/app/soapbox/features/ui/index.tsx b/app/soapbox/features/ui/index.tsx index 5d0a593b3..65b42ce61 100644 --- a/app/soapbox/features/ui/index.tsx +++ b/app/soapbox/features/ui/index.tsx @@ -1,6 +1,5 @@ 'use strict'; -import { QueryClientProvider } from '@tanstack/react-query'; import debounce from 'lodash/debounce'; import React, { useState, useEffect, useRef, useCallback } from 'react'; 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 { fetchReports, fetchUsers, fetchConfig } from 'soapbox/actions/admin'; import { fetchAnnouncements } from 'soapbox/actions/announcements'; -import { fetchChats } from 'soapbox/actions/chats'; import { uploadCompose, resetCompose } from 'soapbox/actions/compose'; import { fetchCustomEmojis } from 'soapbox/actions/custom_emojis'; import { fetchFilters } from 'soapbox/actions/filters'; @@ -120,7 +118,6 @@ import { WrappedRoute } from './util/react_router_helpers'; // Dummy import, to make sure that ends up in the application bundle. // Without this it ends up in ~8 very commonly used bundles. import 'soapbox/components/status'; -import { queryClient } from 'soapbox/queries/client'; const EmptyPage = HomePage; @@ -654,53 +651,51 @@ const UI: React.FC = ({ children }) => { }; return ( - - -
- + +
+ -
- +
+ - - - {!standalone && } - + + + {!standalone && } + - - {children} - - + + {children} + + - {me && floatingActionButton} + {me && floatingActionButton} - - {Component => } - + + {Component => } + - {me && ( - - {Component => } - - )} - {me && features.chats && !mobile && ( - - {Component => } - - )} - - - + {me && ( + {Component => } - - + )} + {me && features.chats && !mobile && ( + {Component => } -
+ )} + + + + {Component => } + + + + {Component => } +
- - +
+
); };