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 { FeedPostsFilter, RepostFilter } from 'types'
|
||||
import { DEFAULT_FILTER_OPTIONS } from 'utils'
|
||||
import { Dots } from 'components/Spinner'
|
||||
|
||||
export const FeedTabPosts = () => {
|
||||
const SHOWING_STEP = 20
|
||||
@ -190,6 +189,7 @@ export const FeedTabPosts = () => {
|
||||
return (
|
||||
<>
|
||||
<NoteSubmit />
|
||||
{discoveredCount ? (
|
||||
<div>
|
||||
<button
|
||||
className='btnMain'
|
||||
@ -198,19 +198,11 @@ export const FeedTabPosts = () => {
|
||||
onClick={discoveredCount ? handleDiscoveredClick : undefined}
|
||||
>
|
||||
<span>
|
||||
{isFetching ? (
|
||||
<>
|
||||
Discovering notes
|
||||
<Dots />
|
||||
</>
|
||||
) : discoveredCount ? (
|
||||
<>Load {discoveredCount} discovered notes</>
|
||||
) : (
|
||||
<>No new notes</>
|
||||
)}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
{isFetching && <LoadingSpinner desc='Fetching notes from relays' />}
|
||||
{filteredNotes.length === 0 && !isFetching && (
|
||||
<div className='IBMSMListFeedNoPosts'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user