hooks: resolve some circular dependencies

This commit is contained in:
Alex Gleason 2023-09-16 05:47:11 -05:00
parent 91dad5f96c
commit caa05b7b7f
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
6 changed files with 9 additions and 6 deletions

View file

@ -1,4 +1,4 @@
import { useLoggedIn } from 'soapbox/hooks';
import { useLoggedIn } from 'soapbox/hooks/useLoggedIn';
import { useTimelineStream } from './useTimelineStream';

View file

@ -1,4 +1,4 @@
import { useAppSelector } from 'soapbox/hooks';
import { useAppSelector } from './useAppSelector';
import type { ReducerCompose } from 'soapbox/reducers/compose';

View file

@ -1,4 +1,4 @@
import { useAppSelector } from 'soapbox/hooks';
import { useAppSelector } from './useAppSelector';
/** Get the Instance for the current backend. */
export const useInstance = () => {

View file

@ -1,8 +1,9 @@
import { useCallback } from 'react';
import { useAppSelector } from 'soapbox/hooks';
import { makeGetAccount } from 'soapbox/selectors';
import { useAppSelector } from './useAppSelector';
/** Get the logged-in account from the store, if any. */
export const useOwnAccount = () => {
const getAccount = useCallback(makeGetAccount(), []);

View file

@ -1,5 +1,6 @@
import { getSettings } from 'soapbox/actions/settings';
import { useAppSelector } from 'soapbox/hooks';
import { useAppSelector } from './useAppSelector';
import type { Map as ImmutableMap } from 'immutable';

View file

@ -1,5 +1,6 @@
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import { useAppSelector } from 'soapbox/hooks';
import { useAppSelector } from './useAppSelector';
import type { SoapboxConfig } from 'soapbox/types/soapbox';