Skip to content

Commit

Permalink
chore: hide marketplace categories when hidden property comes as true (
Browse files Browse the repository at this point in the history
  • Loading branch information
csuadev authored Oct 27, 2023
1 parent e3a475d commit 270d16a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/meteor/client/views/marketplace/hooks/useCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ export const useCategories = (): [CategoryDropDownGroups, selectedCategoriesList
try {
const fetchedCategories = await AppClientOrchestratorInstance.getCategories();

const mappedCategories = fetchedCategories.map((currentCategory) => ({
id: currentCategory.id,
label: currentCategory.title,
checked: false,
}));
const mappedCategories = fetchedCategories
.filter((currentCategory) => !currentCategory.hidden)
.map((currentCategory) => ({
id: currentCategory.id,
label: currentCategory.title,
checked: false,
}));

setCategories([
{
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/ee/client/apps/@types/IOrchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface IAppExternalURL {
export interface ICategory {
createdDate: Date;
description: string;
hidden: boolean;
id: string;
modifiedDate: Date;
title: string;
Expand Down

0 comments on commit 270d16a

Please sign in to comment.