From 2abbc0949350cf3170e804bcb95c7544ab068230 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:28:53 -0500 Subject: [PATCH] Fleet UI: Remove duplication example software (#38165) --- .../CategoriesEndUserExperienceModal.tsx | 50 +++++++++---------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/frontend/pages/SoftwarePage/components/modals/CategoriesEndUserExperienceModal/CategoriesEndUserExperienceModal.tsx b/frontend/pages/SoftwarePage/components/modals/CategoriesEndUserExperienceModal/CategoriesEndUserExperienceModal.tsx index 8c41ddd719..221fa258cc 100644 --- a/frontend/pages/SoftwarePage/components/modals/CategoriesEndUserExperienceModal/CategoriesEndUserExperienceModal.tsx +++ b/frontend/pages/SoftwarePage/components/modals/CategoriesEndUserExperienceModal/CategoriesEndUserExperienceModal.tsx @@ -44,13 +44,23 @@ const columns: Column[] = [ }, ]; +type ExampleSoftware = { + title: string; +}; + +const EXAMPLE_SOFTWARE_ROWS: ExampleSoftware[] = [ + { title: "1Password" }, + { title: "Adobe Acrobat Reader" }, + { title: "Box Drive" }, +]; + const getData = ( name: string, displayName: string, iconUrl: string | null, source?: string -): ISoftwareRow[] => [ - { +): ISoftwareRow[] => { + const currentSoftwareRow: ISoftwareRow = { name: ( ), - }, - { + }; + + // Filters out the current software from the example rows to avoid duplication + const exampleSoftwareRows: ISoftwareRow[] = EXAMPLE_SOFTWARE_ROWS.filter( + (item) => item.title !== name + ).map((item) => ({ name: ( ), - }, - { - name: ( - - ), - }, - { - name: ( - - ), - }, -]; + })); + + return [currentSoftwareRow, ...exampleSoftwareRows]; +}; const EmptyState = () =>
No software found
;