From e3de0d6708a217b118e402ef250b0887aba1a232 Mon Sep 17 00:00:00 2001 From: OJ Abba Date: Fri, 2 Jan 2026 17:47:36 +0000 Subject: [PATCH] [Bug] (SC-204212) Improve site name fallback handling in `Filters` component --- src/components/LinkDevice/blocks/Filters.tsx | 13 ++++--- .../blocks/__tests__/Filters.test.tsx | 36 +++++++++++++++++++ 2 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 src/components/LinkDevice/blocks/__tests__/Filters.test.tsx diff --git a/src/components/LinkDevice/blocks/Filters.tsx b/src/components/LinkDevice/blocks/Filters.tsx index d9387a0..01c75cf 100644 --- a/src/components/LinkDevice/blocks/Filters.tsx +++ b/src/components/LinkDevice/blocks/Filters.tsx @@ -1,9 +1,7 @@ -import { useMemo } from "react"; import { Search, Select } from "@deskpro/app-sdk"; -import { getOptions } from "@/utils"; import { Label } from "@/components/common"; import type { FC } from "react"; -import type { Maybe,Option } from "@/types"; +import type { Maybe, Option } from "@/types"; import type { Site } from "@/services/lansweeper/types"; type Props = { @@ -15,7 +13,12 @@ type Props = { }; const Filters: FC = ({ sites, siteId, isFetching, onChangeSearchQuery, onChangeSite }) => { - const options = useMemo(() => getOptions(sites, "brandingName"), [sites]) as Array