mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Fixed empty state flashing issue on offers list (#19863)
ref DES-101, DES-105
This commit is contained in:
parent
2029a5846a
commit
04c9bf0197
1 changed files with 3 additions and 3 deletions
|
@ -93,7 +93,7 @@ export const CopyLinkButton: React.FC<{offerCode: string}> = ({offerCode}) => {
|
|||
export const OffersIndexModal = () => {
|
||||
const modal = useModal();
|
||||
const {updateRoute} = useRouting();
|
||||
const {data: {offers: allOffers = []} = {}} = useBrowseOffers({
|
||||
const {data: {offers: allOffers = []} = {}, isFetching: isFetchingOffers} = useBrowseOffers({
|
||||
searchParams: {
|
||||
limit: 'all'
|
||||
}
|
||||
|
@ -260,13 +260,13 @@ export const OffersIndexModal = () => {
|
|||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{selectedTab === 'active' && activeOffers.length === 0 ?
|
||||
{selectedTab === 'active' && activeOffers.length === 0 && !isFetchingOffers ?
|
||||
<NoValueLabel icon='tags-block'>
|
||||
No offers found.
|
||||
</NoValueLabel> :
|
||||
null
|
||||
}
|
||||
{selectedTab === 'archived' && archivedOffers.length === 0 ?
|
||||
{selectedTab === 'archived' && archivedOffers.length === 0 && !isFetchingOffers ?
|
||||
<NoValueLabel icon='tags-block'>
|
||||
No offers found.
|
||||
</NoValueLabel> :
|
||||
|
|
Loading…
Add table
Reference in a new issue