mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
use array includes to check loading and error state
This commit is contained in:
parent
0a7c4aed6a
commit
e603e4ee80
@ -63,15 +63,13 @@ const MarketPlacePage = () => {
|
||||
}
|
||||
);
|
||||
|
||||
const isLoading =
|
||||
marketplacePluginsStatus === 'loading' ||
|
||||
installedPluginsStatus === 'loading' ||
|
||||
appInfoStatus === 'loading';
|
||||
const isLoading = [marketplacePluginsStatus, installedPluginsStatus, appInfoStatus].includes(
|
||||
'loading'
|
||||
);
|
||||
|
||||
const hasFailed =
|
||||
marketplacePluginsStatus === 'error' ||
|
||||
installedPluginsStatus === 'error' ||
|
||||
appInfoStatus === 'error';
|
||||
const hasFailed = [marketplacePluginsStatus, installedPluginsStatus, appInfoStatus].includes(
|
||||
'error'
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
trackUsageRef.current('didGoToMarketplace');
|
||||
|
Loading…
x
Reference in New Issue
Block a user