mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Shorten number for replies count
This commit is contained in:
parent
509c1d971e
commit
99357dc887
1 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,7 @@ import { useSnapshot } from 'valtio';
|
|||
import Icon from '../components/icon';
|
||||
import Loader from '../components/loader';
|
||||
import Status from '../components/status';
|
||||
import shortenNumber from '../utils/shorten-number';
|
||||
import states from '../utils/states';
|
||||
import useTitle from '../utils/useTitle';
|
||||
|
||||
|
@ -236,7 +237,10 @@ function StatusPage({ id }) {
|
|||
{descendant && replies?.length > 0 && (
|
||||
<details class="replies" open={!hasManyStatuses}>
|
||||
<summary hidden={!hasManyStatuses}>
|
||||
{replies.length} repl{replies.length === 1 ? 'y' : 'ies'}
|
||||
<span title={replies.length}>
|
||||
{shortenNumber(replies.length)}
|
||||
</span>{' '}
|
||||
repl{replies.length === 1 ? 'y' : 'ies'}
|
||||
</summary>
|
||||
<ul>
|
||||
{replies.map((replyID) => (
|
||||
|
|
Loading…
Reference in a new issue