Revert "Ensure the boost button shows a numeric value (#36805)" (#36850)

This commit is contained in:
Claire 2025-11-12 16:32:55 +01:00 committed by GitHub
parent 00cbc1b910
commit 8abec0ffcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,18 +112,6 @@ const BoostOrQuoteMenu: FC<ReblogButtonProps> = ({ status, counters }) => {
const statusId = status.get('id') as string;
const wasBoosted = !!status.get('reblogged');
let count: number | undefined;
if (counters) {
count = 0;
// Ensure count is a valid integer.
if (Number.isInteger(status.get('reblogs_count'))) {
count += status.get('reblogs_count') as number;
}
if (Number.isInteger(status.get('quotes_count'))) {
count += status.get('quotes_count') as number;
}
}
const showLoginPrompt = useCallback(() => {
dispatch(
openModal({
@ -199,7 +187,12 @@ const BoostOrQuoteMenu: FC<ReblogButtonProps> = ({ status, counters }) => {
)}
icon='retweet'
iconComponent={boostIcon}
counter={count}
counter={
counters
? (status.get('reblogs_count') as number) +
(status.get('quotes_count') as number)
: undefined
}
active={isReblogged}
/>
</Dropdown>