Fixed empty state flashing issue on offers list (#19863)
ref DES-101, DES-105
This commit is contained in:
parent
2029a5846a
commit
04c9bf0197
@ -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…
Reference in New Issue
Block a user