pl-fe: improve mute expiration handling

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-10-27 12:01:06 +01:00
parent be918fbb80
commit d94c19fd9d
5 changed files with 17 additions and 22 deletions

View File

@ -108,6 +108,7 @@ interface IAccount {
note?: string;
items?: React.ReactNode;
disabled?: boolean;
muteExpiresAt?: string | null;
}
const Account = ({
@ -135,6 +136,7 @@ const Account = ({
note,
items,
disabled,
muteExpiresAt,
}: IAccount) => {
const overflowRef = useRef<HTMLDivElement>(null);
const actionRef = useRef<HTMLDivElement>(null);
@ -381,11 +383,11 @@ const Account = ({
</>
)}
{actionType === 'muting' && account.mute_expires_at ? (
{actionType === 'muting' && muteExpiresAt ? (
<>
<Text tag='span' theme='muted' size='sm'>&middot;</Text>
<Text theme='muted' size='sm'><RelativeTimestamp timestamp={account.mute_expires_at} futureDate /></Text>
<Text theme='muted' size='sm'><RelativeTimestamp timestamp={muteExpiresAt} futureDate /></Text>
</>
) : null}