Importer: use EntityStore enums

This commit is contained in:
Alex Gleason 2023-03-16 13:15:00 -05:00
parent c51870af6e
commit 181bf23c34
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -1,4 +1,5 @@
import { importEntities } from 'soapbox/entity-store/actions';
import { Entities } from 'soapbox/entity-store/entities';
import { Group, groupSchema } from 'soapbox/schemas';
import { filteredArray } from 'soapbox/schemas/utils';
@ -23,10 +24,10 @@ const importAccounts = (accounts: APIEntity[]) =>
({ type: ACCOUNTS_IMPORT, accounts });
const importGroup = (group: Group) =>
importEntities([group], 'Group');
importEntities([group], Entities.GROUPS);
const importGroups = (groups: Group[]) =>
importEntities(groups, 'Group');
importEntities(groups, Entities.GROUPS);
const importStatus = (status: APIEntity, idempotencyKey?: string) =>
(dispatch: AppDispatch, getState: () => RootState) => {