mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 06:04:29 +00:00
Add filter api requests
This commit is contained in:
parent
37e34f5dc6
commit
637632b8a5
@ -60,10 +60,6 @@ const MarketPlacePage = () => {
|
||||
|
||||
useFocusWhenNavigate();
|
||||
|
||||
const params = {
|
||||
sort: query?.sort || 'name:asc',
|
||||
};
|
||||
|
||||
const marketplaceTitle = formatMessage({
|
||||
id: 'global.marketplace',
|
||||
defaultMessage: 'Marketplace',
|
||||
@ -81,11 +77,19 @@ const MarketPlacePage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const { status: marketplacePluginsStatus, data: marketplacePluginsResponse } =
|
||||
useFetchMarketplacePlugins(notifyMarketplaceLoad, params);
|
||||
|
||||
const providerParams = {
|
||||
collections: query?.collections || [],
|
||||
sort: query?.sort || 'name:asc',
|
||||
};
|
||||
const { status: marketplaceProvidersStatus, data: marketplaceProvidersResponse } =
|
||||
useFetchMarketplaceProviders(notifyMarketplaceLoad, params);
|
||||
useFetchMarketplaceProviders(notifyMarketplaceLoad, providerParams);
|
||||
|
||||
const pluginParams = {
|
||||
...providerParams,
|
||||
categories: query?.categories || [],
|
||||
};
|
||||
const { status: marketplacePluginsStatus, data: marketplacePluginsResponse } =
|
||||
useFetchMarketplacePlugins(notifyMarketplaceLoad, pluginParams);
|
||||
|
||||
const isLoading = [marketplacePluginsStatus, marketplaceProvidersStatus].includes('loading');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user