Skip to content

Commit

Permalink
disable export button if no non-default presets
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary Hipp authored and Mary Hipp committed Aug 23, 2024
1 parent 231e5ec commit e599c83
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
},
});
Expand Down

0 comments on commit e599c83

Please sign in to comment.