|
1
|
import { useTranslation } from "react-i18next" |
|
2
|
import { HttpTypes } from "@medusajs/types" |
|
3
|
import { Container, Heading } from "@medusajs/ui" |
|
4
|
|
|
5
|
import { formatProvider } from "../../../../lib/format-provider" |
|
6
|
|
|
7
|
export function TaxRegionProviderSection({ |
|
8
|
taxRegion, |
|
9
|
}: { |
|
10
|
taxRegion: HttpTypes.AdminTaxRegion |
|
11
|
}) { |
|
12
|
const { t } = useTranslation() |
|
13
|
|
|
14
|
return ( |
|
15
|
<Container className="divide-y p-0"> |
|
16
|
<Heading level="h2" className="px-6 py-4"> |
|
17
|
{t("taxRegions.provider.header")} |
|
18
|
</Heading> |
|
19
|
<div className="px-6 py-4"> |
|
20
|
{taxRegion.provider_id && ( |
|
21
|
<span className="text-ui-fg-subtle"> |
|
22
|
{formatProvider(taxRegion.provider_id!)} |
|
23
|
</span> |
|
24
|
)} |
|
25
|
</div> |
|
26
|
</Container> |
|
27
|
) |
|
28
|
} |