fix: add missing css

This commit is contained in:
Alejandro Gomez 2023-01-19 11:19:10 +01:00
parent e06c3b2e7a
commit 5a16b11b27
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
4 changed files with 15 additions and 5 deletions

View File

@ -1,9 +1,14 @@
const intl = new Intl.NumberFormat("en", {
minimumFractionDigits: 0,
maximumFractionDigits: 2,
});
export function formatShort(n: number) {
if (n < 999) {
return n
} else if (n < 1e8) {
return `${Math.floor(n / 1e3)}K`
return `${intl.format(Math.floor(n / 1e3))}K`
} else {
return `${Math.floor(n / 1e6)}M`
return `${intl.format(Math.floor(n / 1e6))}M`
}
}

View File

@ -0,0 +1,6 @@
.follows-you {
color: var(--font-secondary-color);
font-size: var(--font-size-tiny);
margin-left: .2em;
font-weight: normal
}

View File

@ -87,8 +87,7 @@
.reaction-pill {
display: flex;
flex-direction: row;
padding: 2px 10px;
border-radius: 10px;
padding: 0px 10px;
user-select: none;
color: var(--font-secondary-color);
}

View File

@ -108,7 +108,7 @@ export default function NoteFooter(props: NoteFooterProps) {
</div>
</div>
)}
<div className="reaction-pill" onClick={(e) => setReply(s => !s)}>
<div className={`reaction-pill ${reply ? 'reacted' : ''}`} onClick={(e) => setReply(s => !s)}>
<div className="reaction-pill-icon">
<FontAwesomeIcon icon={faReply} />
</div>