fix(notes): hide discovery button if empty
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m5s
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m5s
This commit is contained in:
parent
d70495c4cf
commit
e752ed2bb1
@ -14,7 +14,6 @@ import { NoteSubmit } from 'components/Notes/NoteSubmit'
|
|||||||
import { Note } from 'components/Notes/Note'
|
import { Note } from 'components/Notes/Note'
|
||||||
import { FeedPostsFilter, RepostFilter } from 'types'
|
import { FeedPostsFilter, RepostFilter } from 'types'
|
||||||
import { DEFAULT_FILTER_OPTIONS } from 'utils'
|
import { DEFAULT_FILTER_OPTIONS } from 'utils'
|
||||||
import { Dots } from 'components/Spinner'
|
|
||||||
|
|
||||||
export const FeedTabPosts = () => {
|
export const FeedTabPosts = () => {
|
||||||
const SHOWING_STEP = 20
|
const SHOWING_STEP = 20
|
||||||
@ -190,6 +189,7 @@ export const FeedTabPosts = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NoteSubmit />
|
<NoteSubmit />
|
||||||
|
{discoveredCount ? (
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
className='btnMain'
|
className='btnMain'
|
||||||
@ -198,19 +198,11 @@ export const FeedTabPosts = () => {
|
|||||||
onClick={discoveredCount ? handleDiscoveredClick : undefined}
|
onClick={discoveredCount ? handleDiscoveredClick : undefined}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
{isFetching ? (
|
|
||||||
<>
|
|
||||||
Discovering notes
|
|
||||||
<Dots />
|
|
||||||
</>
|
|
||||||
) : discoveredCount ? (
|
|
||||||
<>Load {discoveredCount} discovered notes</>
|
<>Load {discoveredCount} discovered notes</>
|
||||||
) : (
|
|
||||||
<>No new notes</>
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
) : null}
|
||||||
{isFetching && <LoadingSpinner desc='Fetching notes from relays' />}
|
{isFetching && <LoadingSpinner desc='Fetching notes from relays' />}
|
||||||
{filteredNotes.length === 0 && !isFetching && (
|
{filteredNotes.length === 0 && !isFetching && (
|
||||||
<div className='IBMSMListFeedNoPosts'>
|
<div className='IBMSMListFeedNoPosts'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user