From e4dbe2a8c6dab10817b77772c04f21f96cacdce0 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Thu, 13 Jun 2024 14:40:02 -0300 Subject: [PATCH] fix(ZapRecord): change zap_comment to 'comment' and zap_amount to 'amount' --- src/features/ui/components/modals/zaps-modal.tsx | 10 +++++----- src/reducers/user-lists.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/features/ui/components/modals/zaps-modal.tsx b/src/features/ui/components/modals/zaps-modal.tsx index f562cd03b..e5cec90de 100644 --- a/src/features/ui/components/modals/zaps-modal.tsx +++ b/src/features/ui/components/modals/zaps-modal.tsx @@ -11,8 +11,8 @@ import { shortNumberFormat } from 'soapbox/utils/numbers'; interface IAccountWithZaps { id: string; - zap_comment: string; - zap_amount: number; + comment: string; + amount: number; } interface IZapsModal { @@ -28,7 +28,7 @@ const ZapsModal: React.FC = ({ onClose, statusId }) => { const accounts = useMemo((): ImmutableList | undefined => { if (!zaps) return; - return zaps.map(({ account, zap_amount, zap_comment }) =>({ id: account, zap_amount, zap_comment })).flatten() as ImmutableList; + return zaps.map(({ account, amount, comment }) =>({ id: account, amount, comment })).flatten() as ImmutableList; }, [zaps]); const fetchData = () => { @@ -63,9 +63,9 @@ const ZapsModal: React.FC = ({ onClose, statusId }) => { return (
- {shortNumberFormat(account.zap_amount / 1000)} + {shortNumberFormat(account.amount / 1000)} - +
); }, diff --git a/src/reducers/user-lists.ts b/src/reducers/user-lists.ts index 518a43d6c..cf420c299 100644 --- a/src/reducers/user-lists.ts +++ b/src/reducers/user-lists.ts @@ -93,8 +93,8 @@ const ReactionListRecord = ImmutableRecord({ export const ZapRecord = ImmutableRecord({ account: '', - zap_comment: '', - zap_amount: 0, // in millisats + comment: '', + amount: 0, // in millisats }); const ZapListRecord = ImmutableRecord({