refactor: get rid of EntityTypes[Entities.STATUSES]

This commit is contained in:
P. Reis 2024-12-11 16:38:08 -03:00
parent 65f03707e4
commit ca70e6e6fa
1 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
import { EntityTypes, Entities } from 'soapbox/entity-store/entities.ts';
import { Entities } from 'soapbox/entity-store/entities.ts';
import { useEntities } from 'soapbox/entity-store/hooks/index.ts';
import { useApi } from 'soapbox/hooks/useApi.ts';
import { useFeatures } from 'soapbox/hooks/useFeatures.ts';
import { statusSchema } from 'soapbox/schemas/status.ts';
import { Status as StatusEntity, statusSchema } from 'soapbox/schemas/index.ts';
/**
* Get all the statuses the user has bookmarked.
@ -14,7 +14,7 @@ function useBookmarks() {
const api = useApi();
const features = useFeatures();
const { entities, ...result } = useEntities<EntityTypes[Entities.STATUSES]>(
const { entities, ...result } = useEntities<StatusEntity>(
[Entities.STATUSES, 'bookmarks'],
() => api.get('/api/v1/bookmarks'),
{ enabled: features.bookmarks, schema: statusSchema },