From 4e294f9e3e757705085d592056246f9e7e8f401d Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Fri, 23 Aug 2024 13:44:32 -0400 Subject: [PATCH] disable export button if no non-default presets --- .../stylePresets/components/StylePresetExportButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/stylePresets/components/StylePresetExportButton.tsx b/invokeai/frontend/web/src/features/stylePresets/components/StylePresetExportButton.tsx index 3b1c6caa39..dc02b63c4f 100644 --- a/invokeai/frontend/web/src/features/stylePresets/components/StylePresetExportButton.tsx +++ b/invokeai/frontend/web/src/features/stylePresets/components/StylePresetExportButton.tsx @@ -16,9 +16,9 @@ export const StylePresetExportButton = () => { const { t } = useTranslation(); const { presetCount } = useListStylePresetsQuery(undefined, { selectFromResult: ({ data }) => { - const userPresets = data?.filter((preset) => preset.type === 'user') ?? EMPTY_ARRAY; + const presetsToExport = data?.filter((preset) => preset.type !== 'default') ?? EMPTY_ARRAY; return { - presetCount: userPresets.length, + presetCount: presetsToExport.length, }; }, });