Count total

This commit is contained in:
Eric Bailey
2025-04-02 15:46:04 -05:00
parent ca0d226410
commit cf503ab676
@@ -132,6 +132,7 @@ export function AvatarStack({
const t = useTheme() const t = useTheme()
const {gtPhone} = useBreakpoints() const {gtPhone} = useBreakpoints()
const moderationOpts = useModerationOpts() const moderationOpts = useModerationOpts()
const computedTotal = (total ?? numPending) - numPending
const circlesCount = numPending + 1 // add total at end const circlesCount = numPending + 1 // add total at end
const widthPerc = 100 / circlesCount const widthPerc = 100 / circlesCount
const [size, setSize] = React.useState<number | null>(null) const [size, setSize] = React.useState<number | null>(null)
@@ -230,7 +231,7 @@ export function AvatarStack({
backgroundColor: t.atoms.text_contrast_low.color, backgroundColor: t.atoms.text_contrast_low.color,
}, },
]}> ]}>
{total ? ( {computedTotal > 0 ? (
<Text <Text
style={[ style={[
gtPhone ? a.text_md : a.text_sm, gtPhone ? a.text_md : a.text_sm,
@@ -239,7 +240,7 @@ export function AvatarStack({
{color: 'white'}, {color: 'white'},
]}> ]}>
<Trans comment="Indicates the number of additional profiles are in the Starter Pack e.g. +12"> <Trans comment="Indicates the number of additional profiles are in the Starter Pack e.g. +12">
+{total} +{computedTotal}
</Trans> </Trans>
</Text> </Text>
) : ( ) : (