import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import { getByName } from "@saleor/components/Filter/utils"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; import { VoucherListUrlSortField } from "@saleor/discounts/urls"; import { VoucherFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { ChannelProps, FilterPageProps, ListActions, PageListProps, SortPage, TabPageProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import VoucherList from "../VoucherList"; import { createFilterStructure, VoucherFilterKeys, VoucherListFilterOpts } from "./filters"; export interface VoucherListPageProps extends PageListProps, ListActions, FilterPageProps, SortPage, TabPageProps, ChannelProps { vouchers: VoucherFragment[]; } const VoucherListPage: React.FC = ({ currentTab, filterOpts, initialSearch, onAdd, onAll, onFilterChange, onSearchChange, onTabChange, onTabDelete, onTabSave, tabs, ...listProps }) => { const intl = useIntl(); const structure = createFilterStructure(intl, filterOpts); const filterDependency = structure.find(getByName("channel")); return ( ); }; VoucherListPage.displayName = "VoucherListPage"; export default VoucherListPage;