mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +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,19 +45,31 @@ 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}`
|
||||
}
|
||||
>
|
||||
<Icon icon="hashtag" /> <span>{tag.name}</span>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<>
|
||||
<ul class="link-list">
|
||||
{followedHashtags.map((tag) => (
|
||||
<li>
|
||||
<Link
|
||||
to={
|
||||
instance
|
||||
? `/${instance}/t/${tag.name}`
|
||||
: `/t/${tag.name}`
|
||||
}
|
||||
>
|
||||
<Icon icon="hashtag" /> <span>{tag.name}</span>
|
||||
</Link>
|
||||
</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,14 +61,15 @@ function Lists() {
|
|||
</header>
|
||||
<main>
|
||||
{lists.length > 0 ? (
|
||||
<ul class="link-list">
|
||||
{lists.map((list) => (
|
||||
<li>
|
||||
<Link to={`/l/${list.id}`}>
|
||||
<span>
|
||||
<Icon icon="list" /> <span>{list.title}</span>
|
||||
</span>
|
||||
{/* <button
|
||||
<>
|
||||
<ul class="link-list">
|
||||
{lists.map((list) => (
|
||||
<li>
|
||||
<Link to={`/l/${list.id}`}>
|
||||
<span>
|
||||
<Icon icon="list" /> <span>{list.title}</span>
|
||||
</span>
|
||||
{/* <button
|
||||
type="button"
|
||||
class="plain"
|
||||
onClick={(e) => {
|
||||
|
@ -81,10 +82,19 @@ function Lists() {
|
|||
>
|
||||
<Icon icon="pencil" />
|
||||
</button> */}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</Link>
|
||||
</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