diff --git a/apps/web/src/components/typography/combobox.tsx b/apps/web/src/components/typography/combobox.tsx index 6bd0d792e..2a0b28be2 100644 --- a/apps/web/src/components/typography/combobox.tsx +++ b/apps/web/src/components/typography/combobox.tsx @@ -5,25 +5,25 @@ import { cn } from "@reactive-resume/utils/style"; import { Combobox } from "@/components/ui/combobox"; import { FontDisplay } from "./font-display"; +// Options depend only on the static font list, so compute them once per process +// instead of per component instance (the body + heading pickers rendered identical output twice). +const FONT_FAMILY_OPTIONS = fontList.map((font) => ({ + value: font.family, + keywords: getFontSearchKeywords(font.family), + label: ( + + ), +})); + type FontFamilyComboboxProps = Omit; export function FontFamilyCombobox({ className, ...props }: FontFamilyComboboxProps) { - const options = useMemo(() => { - return fontList.map((font) => ({ - value: font.family, - keywords: getFontSearchKeywords(font.family), - label: ( - - ), - })); - }, []); - - return ; + return ; } type FontWeightComboboxProps = Omit & { fontFamily: string };