entity hooks: resolve some circular dependencies
This commit is contained in:
parent
1a036ecee0
commit
816d48a395
12 changed files with 27 additions and 12 deletions
|
@ -1,7 +1,9 @@
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { useAppDispatch, useAppSelector, useGetState } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useAppSelector } from 'soapbox/hooks/useAppSelector';
|
||||||
|
import { useGetState } from 'soapbox/hooks/useGetState';
|
||||||
import { filteredArray } from 'soapbox/schemas/utils';
|
import { filteredArray } from 'soapbox/schemas/utils';
|
||||||
|
|
||||||
import { entitiesFetchFail, entitiesFetchRequest, entitiesFetchSuccess } from '../actions';
|
import { entitiesFetchFail, entitiesFetchRequest, entitiesFetchSuccess } from '../actions';
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { importEntities } from 'soapbox/entity-store/actions';
|
import { importEntities } from 'soapbox/entity-store/actions';
|
||||||
import { Entities } from 'soapbox/entity-store/entities';
|
import { Entities } from 'soapbox/entity-store/entities';
|
||||||
import { type Entity } from 'soapbox/entity-store/types';
|
import { type Entity } from 'soapbox/entity-store/types';
|
||||||
import { useAppDispatch, useGetState } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useGetState } from 'soapbox/hooks/useGetState';
|
||||||
|
|
||||||
type ChangeEntityFn<TEntity extends Entity> = (entity: TEntity) => TEntity
|
type ChangeEntityFn<TEntity extends Entity> = (entity: TEntity) => TEntity
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { useAppDispatch, useLoading } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useLoading } from 'soapbox/hooks/useLoading';
|
||||||
|
|
||||||
import { importEntities } from '../actions';
|
import { importEntities } from '../actions';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import { useAppDispatch, useGetState, useLoading } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useGetState } from 'soapbox/hooks/useGetState';
|
||||||
|
import { useLoading } from 'soapbox/hooks/useLoading';
|
||||||
|
|
||||||
import { deleteEntities, importEntities } from '../actions';
|
import { deleteEntities, importEntities } from '../actions';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { useAppDispatch, useLoading } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useLoading } from 'soapbox/hooks/useLoading';
|
||||||
|
|
||||||
import { dismissEntities } from '../actions';
|
import { dismissEntities } from '../actions';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,10 @@ import { useEffect } from 'react';
|
||||||
import z from 'zod';
|
import z from 'zod';
|
||||||
|
|
||||||
import { getNextLink, getPrevLink } from 'soapbox/api';
|
import { getNextLink, getPrevLink } from 'soapbox/api';
|
||||||
import { useApi, useAppDispatch, useAppSelector, useGetState } from 'soapbox/hooks';
|
import { useApi } from 'soapbox/hooks/useApi';
|
||||||
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useAppSelector } from 'soapbox/hooks/useAppSelector';
|
||||||
|
import { useGetState } from 'soapbox/hooks/useGetState';
|
||||||
import { filteredArray } from 'soapbox/schemas/utils';
|
import { filteredArray } from 'soapbox/schemas/utils';
|
||||||
import { realNumberSchema } from 'soapbox/utils/numbers';
|
import { realNumberSchema } from 'soapbox/utils/numbers';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,9 @@ import { AxiosError } from 'axios';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import z from 'zod';
|
import z from 'zod';
|
||||||
|
|
||||||
import { useAppDispatch, useAppSelector, useLoading } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useAppSelector } from 'soapbox/hooks/useAppSelector';
|
||||||
|
import { useLoading } from 'soapbox/hooks/useLoading';
|
||||||
|
|
||||||
import { importEntities } from '../actions';
|
import { importEntities } from '../actions';
|
||||||
import { selectEntity } from '../selectors';
|
import { selectEntity } from '../selectors';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { useApi } from 'soapbox/hooks';
|
import { useApi } from 'soapbox/hooks/useApi';
|
||||||
|
|
||||||
import { useCreateEntity } from './useCreateEntity';
|
import { useCreateEntity } from './useCreateEntity';
|
||||||
import { useDeleteEntity } from './useDeleteEntity';
|
import { useDeleteEntity } from './useDeleteEntity';
|
||||||
|
|
|
@ -2,7 +2,9 @@ import { AxiosError } from 'axios';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { useAppDispatch, useAppSelector, useLoading } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useAppSelector } from 'soapbox/hooks/useAppSelector';
|
||||||
|
import { useLoading } from 'soapbox/hooks/useLoading';
|
||||||
|
|
||||||
import { importEntities } from '../actions';
|
import { importEntities } from '../actions';
|
||||||
import { findEntity } from '../selectors';
|
import { findEntity } from '../selectors';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { useAppDispatch, useLoading } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
import { useLoading } from 'soapbox/hooks/useLoading';
|
||||||
|
|
||||||
import { incrementEntities } from '../actions';
|
import { incrementEntities } from '../actions';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { entitiesTransaction } from 'soapbox/entity-store/actions';
|
import { entitiesTransaction } from 'soapbox/entity-store/actions';
|
||||||
import { useAppDispatch } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch';
|
||||||
|
|
||||||
import type { EntityTypes } from 'soapbox/entity-store/entities';
|
import type { EntityTypes } from 'soapbox/entity-store/entities';
|
||||||
import type { EntitiesTransaction, Entity } from 'soapbox/entity-store/types';
|
import type { EntitiesTransaction, Entity } from 'soapbox/entity-store/types';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { useGroups } from 'soapbox/api/hooks';
|
import { useGroups } from 'soapbox/api/hooks/groups/useGroups';
|
||||||
|
|
||||||
import { useFeatures } from './useFeatures';
|
import { useFeatures } from './useFeatures';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue