fix(dashboard): display location details address (#7491)

**What**
- display the address of the location on the details page
- use address formatting utils
- fix caching keys for shipping options

---

CLOSES CORE-2127
This commit is contained in:
Frane Polić
2024-05-29 06:49:30 +00:00
committed by GitHub
parent 01703c155f
commit 7d6a87241d
10 changed files with 39 additions and 21 deletions
@@ -1,7 +1,8 @@
import { Address } from "@medusajs/medusa"
import { AddressDTO } from "@medusajs/types"
import { countries } from "./countries"
export const isSameAddress = (a: Address | null, b: Address | null) => {
export const isSameAddress = (a: AddressDTO | null, b: AddressDTO | null) => {
if (!a || !b) {
return false
}
@@ -21,7 +22,7 @@ export const isSameAddress = (a: Address | null, b: Address | null) => {
export const getFormattedAddress = ({
address,
}: {
address?: Partial<Address> | null
address?: Partial<AddressDTO> | null
}) => {
if (!address) {
return []