Skip to content

Commit

Permalink
fix(dashboard,types): Add missing Metadata form for Region domain and…
Browse files Browse the repository at this point in the history
… fix payload types (#10449)
  • Loading branch information
kasperkristensen authored Dec 5, 2024
1 parent be15240 commit 16663ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/five-hairs-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/dashboard": patch
"@medusajs/types": patch
---

fix(dashboard,types): Add missing Metadata form for Region domain and fix types
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,10 @@ export const RouteMap: RouteObject[] = [
lazy: () =>
import("../../routes/regions/region-add-countries"),
},
{
path: "metadata/edit",
lazy: () => import("../../routes/regions/region-metadata"),
},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { useRegion, useUpdateRegion } from "../../../hooks/api"
export const RegionMetadata = () => {
const { id } = useParams()

const { region, isPending, isError, error } = useRegion(id)
const { mutateAsync, isPending: isMutating } = useUpdateRegion(id)
const { region, isPending, isError, error } = useRegion(id!)
const { mutateAsync, isPending: isMutating } = useUpdateRegion(id!)

if (isError) {
throw error
Expand Down
4 changes: 2 additions & 2 deletions packages/core/types/src/http/region/admin/payloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface AdminCreateRegion {
automatic_taxes?: boolean
is_tax_inclusive?: boolean
payment_providers?: string[]
metadata?: Record<string, any>
metadata?: Record<string, any> | null
}

export interface AdminUpdateRegion {
Expand All @@ -15,5 +15,5 @@ export interface AdminUpdateRegion {
automatic_taxes?: boolean
is_tax_inclusive?: boolean
payment_providers?: string[]
metadata?: Record<string, any>
metadata?: Record<string, any> | null
}

0 comments on commit 16663ec

Please sign in to comment.