mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-22 05:39:20 +01:00
Show total at end of list
This commit is contained in:
parent
46d7cba1ea
commit
28bb66f185
2 changed files with 47 additions and 25 deletions
|
@ -45,12 +45,15 @@ function FollowedHashtags() {
|
|||
</header>
|
||||
<main>
|
||||
{followedHashtags.length > 0 ? (
|
||||
<>
|
||||
<ul class="link-list">
|
||||
{followedHashtags.map((tag) => (
|
||||
<li>
|
||||
<Link
|
||||
to={
|
||||
instance ? `/${instance}/t/${tag.name}` : `/t/${tag.name}`
|
||||
instance
|
||||
? `/${instance}/t/${tag.name}`
|
||||
: `/t/${tag.name}`
|
||||
}
|
||||
>
|
||||
<Icon icon="hashtag" /> <span>{tag.name}</span>
|
||||
|
@ -58,6 +61,15 @@ function FollowedHashtags() {
|
|||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{followedHashtags.length > 1 && (
|
||||
<footer class="ui-state">
|
||||
<small class="insignificant">
|
||||
{followedHashtags.length} hashtag
|
||||
{followedHashtags.length === 1 ? '' : 's'}
|
||||
</small>
|
||||
</footer>
|
||||
)}
|
||||
</>
|
||||
) : uiState === 'loading' ? (
|
||||
<p class="ui-state">
|
||||
<Loader abrupt />
|
||||
|
|
|
@ -61,6 +61,7 @@ function Lists() {
|
|||
</header>
|
||||
<main>
|
||||
{lists.length > 0 ? (
|
||||
<>
|
||||
<ul class="link-list">
|
||||
{lists.map((list) => (
|
||||
<li>
|
||||
|
@ -85,6 +86,15 @@ function Lists() {
|
|||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{lists.length > 1 && (
|
||||
<footer class="ui-state">
|
||||
<small class="insignificant">
|
||||
{lists.length} list
|
||||
{lists.length === 1 ? '' : 's'}
|
||||
</small>
|
||||
</footer>
|
||||
)}
|
||||
</>
|
||||
) : uiState === 'loading' ? (
|
||||
<p class="ui-state">
|
||||
<Loader />
|
||||
|
|
Loading…
Reference in a new issue