diff --git a/frontend/src/components/filters/standardDimensions.tsx b/frontend/src/components/filters/standardDimensions.tsx index a4ebefb..d3d7372 100644 --- a/frontend/src/components/filters/standardDimensions.tsx +++ b/frontend/src/components/filters/standardDimensions.tsx @@ -1,6 +1,7 @@ import TreeSelect from 'antd/es/tree-select'; import Empty from 'antd/es/empty'; import Select from 'antd/es/select'; +import Switch from 'antd/es/switch'; import Tag from 'antd/es/tag'; import Slider from 'antd/es/slider'; import InputNumber from 'antd/es/input-number'; @@ -8,6 +9,9 @@ import { buildCategoryTree, categoryPath, formatPriceRange, + ItemStatus, + STATUS_OPTIONS, + statusLabel, toCategoryTreeData } from '../../filters'; import type { FilterDimension } from './dimension'; @@ -190,3 +194,78 @@ export const priceDimension: FilterDimension = { } ] }; + +export const favoritesDimension: FilterDimension = { + key: 'favorites', + placement: 'drawer', + heading: 'Favorites', + + // Shown to signed-out visitors too: switching it on prompts them to sign in, + // which is how they learn favorites exist. The prompt itself is not this + // dimension's business — useCatalogue reports needsFavoritesAuth and the page + // owns the modal. + render: ({ filters, onChange }) => ( + // Deliberately not wrapped in a