pl-hooks: Updates, add useStatusTranslation query

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-10-24 23:46:22 +02:00
parent 39f975c793
commit d6aa4bf388
10 changed files with 33 additions and 16 deletions

View File

@ -7,4 +7,4 @@ const normalizeAccount = ({ moved, relationship, ...account }: BaseAccount) => (
type Account = ReturnType<typeof normalizeAccount>;
export { normalizeAccount, type Account };
export { normalizeAccount, type Account as NormalizedAccount };

View File

@ -55,14 +55,11 @@ const normalizeStatus = ({ account, accounts, reblog, poll, group, quote, ...sta
reblog_id: reblog?.id || null,
poll_id: poll?.id || null,
group_id: group?.id || null,
translating: false,
expectsCard: false,
showFiltered: null as null | boolean,
...status,
quote_id: quote?.id || status.quote_id || null,
mentions,
expanded: null,
hidden: null,
filtered: status.filtered?.map(result => result.filter.title),
event,
media_attachments,
@ -75,5 +72,5 @@ export {
type StatusApprovalStatus,
type StatusVisibility,
normalizeStatus,
type Status,
type Status as NormalizedStatus,
};