import { parse as parseQs } from "qs"; import * as React from "react"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; import { WindowTitle } from "../components/WindowTitle"; import i18n from "../i18n"; import { customerAddPath, customerAddressesPath, CustomerAddressesUrlQueryParams, customerListPath, CustomerListUrlQueryParams, 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.StatelessComponent> = ({ location }) => { const qs = parseQs(location.search.substr(1)); const params: CustomerListUrlQueryParams = qs; return ; }; interface CustomerDetailsRouteParams { id: string; } const CustomerDetailsView: React.StatelessComponent< RouteComponentProps > = ({ location, match }) => { const qs = parseQs(location.search.substr(1)); const params: CustomerUrlQueryParams = qs; return ( ); }; interface CustomerAddressesRouteParams { id: string; } const CustomerAddressesView: React.StatelessComponent< RouteComponentProps > = ({ match }) => { const qs = parseQs(location.search.substr(1)); const params: CustomerAddressesUrlQueryParams = qs; return ( ); }; export const CustomerSection: React.StatelessComponent<{}> = () => ( <> );