- {snapsLoading && storesLoading && membersLoading ? (
+ {snapsLoading && membersLoading ? (
@@ -479,7 +473,7 @@ function Snaps(): ReactNode {
content: (
state.brandStores.loading,
- );
- const brandStoresList: StoresList = useSelector(brandStoresListSelector);
- const dispatch = useDispatch();
-
- const queryClient = new QueryClient({
- defaultOptions: {
- queries: {
- refetchOnWindowFocus: false,
- refetchOnReconnect: false,
- },
- },
- });
+function App() {
+ const { data: brandStoresList, isLoading } = useBrandStores();
const setRecoilBrandStores = useSetRecoilState(brandStoresState);
- useEffect(() => {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- dispatch(fetchStores() as any);
- }, []);
-
useEffect(() => {
if (brandStoresList) {
setRecoilBrandStores(brandStoresList);
@@ -56,49 +34,47 @@ function App(): ReactNode {
return (
-
-
-
- ) : brandStoresList[0].id === "ubuntu" ? (
- // Don't redirect to the global store by default
-
- ) : (
-
- )
- ) : null
- }
- />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- }
- />
- }
- />
- } />
- }
- />
-
-
+
+
+ ) : brandStoresList[0].id === "ubuntu" ? (
+ // Don't redirect to the global store by default
+
+ ) : (
+
+ )
+ ) : null
+ }
+ />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ }
+ />
+ }
+ />
+ } />
+ }
+ />
+
);
}