fix(ZapRecord): change zap_comment to 'comment' and zap_amount to 'amount'
This commit is contained in:
parent
ed33cd400c
commit
e4dbe2a8c6
|
@ -11,8 +11,8 @@ import { shortNumberFormat } from 'soapbox/utils/numbers';
|
||||||
|
|
||||||
interface IAccountWithZaps {
|
interface IAccountWithZaps {
|
||||||
id: string;
|
id: string;
|
||||||
zap_comment: string;
|
comment: string;
|
||||||
zap_amount: number;
|
amount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IZapsModal {
|
interface IZapsModal {
|
||||||
|
@ -28,7 +28,7 @@ const ZapsModal: React.FC<IZapsModal> = ({ onClose, statusId }) => {
|
||||||
const accounts = useMemo((): ImmutableList<IAccountWithZaps> | undefined => {
|
const accounts = useMemo((): ImmutableList<IAccountWithZaps> | undefined => {
|
||||||
if (!zaps) return;
|
if (!zaps) return;
|
||||||
|
|
||||||
return zaps.map(({ account, zap_amount, zap_comment }) =>({ id: account, zap_amount, zap_comment })).flatten() as ImmutableList<IAccountWithZaps>;
|
return zaps.map(({ account, amount, comment }) =>({ id: account, amount, comment })).flatten() as ImmutableList<IAccountWithZaps>;
|
||||||
}, [zaps]);
|
}, [zaps]);
|
||||||
|
|
||||||
const fetchData = () => {
|
const fetchData = () => {
|
||||||
|
@ -63,9 +63,9 @@ const ZapsModal: React.FC<IZapsModal> = ({ onClose, statusId }) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Text weight='bold'>
|
<Text weight='bold'>
|
||||||
{shortNumberFormat(account.zap_amount / 1000)}
|
{shortNumberFormat(account.amount / 1000)}
|
||||||
</Text>
|
</Text>
|
||||||
<AccountContainer key={account.id} id={account.id} note={account.zap_comment} emoji='⚡' />
|
<AccountContainer key={account.id} id={account.id} note={account.comment} emoji='⚡' />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -93,8 +93,8 @@ const ReactionListRecord = ImmutableRecord({
|
||||||
|
|
||||||
export const ZapRecord = ImmutableRecord({
|
export const ZapRecord = ImmutableRecord({
|
||||||
account: '',
|
account: '',
|
||||||
zap_comment: '',
|
comment: '',
|
||||||
zap_amount: 0, // in millisats
|
amount: 0, // in millisats
|
||||||
});
|
});
|
||||||
|
|
||||||
const ZapListRecord = ImmutableRecord({
|
const ZapListRecord = ImmutableRecord({
|
||||||
|
|
Loading…
Reference in New Issue