Make profile formatting hydration-safe

This commit is contained in:
test
2026-08-30 09:28:07 +02:00
parent 5db36cb29f
commit 71972afb87
9 changed files with 44 additions and 60 deletions
@@ -1,5 +1,6 @@
import React, { useState } from 'react'
import NovaConfirmDialog from '../ui/NovaConfirmDialog'
import { formatProfileNumber } from '../../lib/profileFormatters'
export default function FollowButton({
username,
@@ -79,7 +80,7 @@ export default function FollowButton({
>
<i className={`fa-solid fa-fw ${loading ? 'fa-circle-notch fa-spin' : following ? (hovered ? 'fa-user-minus' : 'fa-user-check') : 'fa-user-plus'}`} />
<span>{following ? (hovered ? 'Unfollow' : 'Following') : 'Follow'}</span>
{showCount ? <span className="text-xs opacity-70">{count.toLocaleString()}</span> : null}
{showCount ? <span className="text-xs opacity-70">{formatProfileNumber(count)}</span> : null}
</button>
<NovaConfirmDialog