Skip to content

Commit

Permalink
Show Launchpad or table.
Browse files Browse the repository at this point in the history
  • Loading branch information
allilevine committed Jan 9, 2025
1 parent 8d14285 commit cac44f9
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,23 @@ const SubscriberDataViews = ( {

return (
<section className="subscriber-data-views">
<DataViews< Subscriber >
data={ data }
fields={ fields }
view={ currentView }
onChangeView={ handleViewChange }
isLoading={ isLoading }
paginationInfo={ paginationInfo }
getItemId={ ( item: Subscriber ) => item.subscription_id.toString() }
defaultLayouts={ { table: {} } }
actions={ actions }
search
searchLabel={ translate( 'Search by name, username or email…' ) }
/>
{ shouldShowLaunchpad && <EmptyComponent /> }
{ shouldShowLaunchpad ? (
<EmptyComponent />
) : (
<DataViews< Subscriber >
data={ data }
fields={ fields }
view={ currentView }
onChangeView={ handleViewChange }
isLoading={ isLoading }
paginationInfo={ paginationInfo }
getItemId={ ( item: Subscriber ) => item.subscription_id.toString() }
defaultLayouts={ { table: {} } }
actions={ actions }
search
searchLabel={ translate( 'Search by name, username or email…' ) }
/>
) }
</section>
);
};
Expand Down

0 comments on commit cac44f9

Please sign in to comment.