import { sectionNames } from "@saleor/intl"; import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; import { WindowTitle } from "../components/WindowTitle"; import { customerAddPath, customerAddressesPath, CustomerAddressesUrlQueryParams, customerListPath, CustomerListUrlQueryParams, CustomerListUrlSortField, customerPath, CustomerUrlQueryParams } from "./urls"; import CustomerAddressesViewComponent from "./views/CustomerAddresses"; import CustomerCreateView from "./views/CustomerCreate"; import CustomerDetailsViewComponent from "./views/CustomerDetails"; import CustomerListViewComponent from "./views/CustomerList"; const CustomerListView: React.FC> = ({ location }) => { const qs = parseQs(location.search.substr(1)); const params: CustomerListUrlQueryParams = asSortParams( qs, CustomerListUrlSortField ); return ; }; interface CustomerDetailsRouteParams { id: string; } const CustomerDetailsView: React.FC> = ({ location, match }) => { const qs = parseQs(location.search.substr(1)); const params: CustomerUrlQueryParams = qs; return ( ); }; interface CustomerAddressesRouteParams { id: string; } const CustomerAddressesView: React.FC> = ({ match }) => { const qs = parseQs(location.search.substr(1)); const params: CustomerAddressesUrlQueryParams = qs; return ( ); }; export const CustomerSection: React.FC<{}> = () => { const intl = useIntl(); return ( <> ); };