fix: import the bookmarked status to the start of the cache array

This commit is contained in:
P. Reis 2024-12-13 22:49:39 -03:00
parent e3aff3bdc6
commit beed9fa6c3
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ function useBookmark() {
const response = await api.post(`/api/v1/statuses/${statusId}/bookmark`); const response = await api.post(`/api/v1/statuses/${statusId}/bookmark`);
const result = statusSchema.safeParse(await response.json()); const result = statusSchema.safeParse(await response.json());
if (result.success) { if (result.success) {
dispatch(importEntities([result.data], Entities.STATUSES, 'bookmarks')); dispatch(importEntities([result.data], Entities.STATUSES, 'bookmarks', 'start'));
} }
return { success: true }; return { success: true };
} catch (e) { } catch (e) {