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 =
|
const isLoading = [marketplacePluginsStatus, installedPluginsStatus, appInfoStatus].includes(
|
||||||
marketplacePluginsStatus === 'loading' ||
|
'loading'
|
||||||
installedPluginsStatus === 'loading' ||
|
);
|
||||||
appInfoStatus === 'loading';
|
|
||||||
|
|
||||||
const hasFailed =
|
const hasFailed = [marketplacePluginsStatus, installedPluginsStatus, appInfoStatus].includes(
|
||||||
marketplacePluginsStatus === 'error' ||
|
'error'
|
||||||
installedPluginsStatus === 'error' ||
|
);
|
||||||
appInfoStatus === 'error';
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
trackUsageRef.current('didGoToMarketplace');
|
trackUsageRef.current('didGoToMarketplace');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user