diff --git a/src/attributes/views/AttributeList/AttributeList.tsx b/src/attributes/views/AttributeList/AttributeList.tsx index 12f6207d5..63defa847 100644 --- a/src/attributes/views/AttributeList/AttributeList.tsx +++ b/src/attributes/views/AttributeList/AttributeList.tsx @@ -26,6 +26,7 @@ import { getSortParams } from "@saleor/utils/sort"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import useShop from "@saleor/hooks/useShop"; import { PAGINATE_BY } from "../../../config"; import useBulkActions from "../../../hooks/useBulkActions"; import { maybe } from "../../../misc"; @@ -52,6 +53,7 @@ const AttributeList: React.FC = ({ params }) => { const navigate = useNavigator(); const paginate = usePaginator(); const notify = useNotifier(); + const shop = useShop(); const { isSelected, listElements, reset, toggle, toggleAll } = useBulkActions( params.ids ); @@ -138,6 +140,7 @@ const AttributeList: React.FC = ({ params }) => { }; const handleSort = createSortHandler(navigate, attributeListUrl, params); + const currencySymbol = maybe(() => shop.defaultCurrency, "USD"); return ( @@ -147,6 +150,7 @@ const AttributeList: React.FC = ({ params }) => { attributes={maybe(() => data.attributes.edges.map(edge => edge.node) )} + currencySymbol={currencySymbol} currentTab={currentTab} disabled={loading || attributeBulkDeleteOpts.loading} filterOpts={getFilterOpts(params)} diff --git a/src/storybook/stories/attributes/AttributeListPage.tsx b/src/storybook/stories/attributes/AttributeListPage.tsx index 020aa6e9e..61bfc3038 100644 --- a/src/storybook/stories/attributes/AttributeListPage.tsx +++ b/src/storybook/stories/attributes/AttributeListPage.tsx @@ -10,7 +10,8 @@ import { pageListProps, searchPageProps, tabPageProps, - sortPageProps + sortPageProps, + filterPageProps } from "@saleor/fixtures"; import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import Decorator from "../../Decorator"; @@ -20,7 +21,34 @@ const props: AttributeListPageProps = { ...listActionsProps, ...tabPageProps, ...searchPageProps, + ...filterPageProps, attributes, + filterOpts: { + availableInGrid: { + active: false, + value: false + }, + filterableInDashboard: { + active: false, + value: false + }, + filterableInStorefront: { + active: false, + value: false + }, + isVariantOnly: { + active: false, + value: false + }, + valueRequired: { + active: false, + value: false + }, + visibleInStorefront: { + active: false, + value: false + } + }, onBack: () => undefined, onSort: () => undefined, sort: {