saleor-dashboard/src/taxes/index.tsx
Krzysztof Wolski a82de30309
Add circleci config and enhance our linters (#519)
* Add circleci config

* Season linting config

* Apply code style
2020-05-14 11:30:32 +02:00

35 lines
984 B
TypeScript

import { sectionNames } from "@saleor/intl";
import React from "react";
import { useIntl } from "react-intl";
import { Route, RouteComponentProps, Switch } from "react-router-dom";
import { WindowTitle } from "../components/WindowTitle";
import { countryListPath, countryTaxRatesPath } from "./urls";
import CountryList from "./views/CountryList";
import CountryTaxesComponent, {
CountryTaxesParams
} from "./views/CountryTaxes";
const CountryTaxes: React.FC<RouteComponentProps<CountryTaxesParams>> = ({
match
}) => <CountryTaxesComponent code={match.params.code} />;
const Component = () => {
const intl = useIntl();
return (
<>
<WindowTitle title={intl.formatMessage(sectionNames.taxes)} />
<Switch>
<Route exact path={countryListPath} component={CountryList} />
<Route
exact
path={countryTaxRatesPath(":code")}
component={CountryTaxes}
/>
</Switch>
</>
);
};
export default Component;