fix(admin-shared,dashboard): Add missing injection zones (#10098)

**What**
- Adds missing InjectionZones for ProductVariant details page.
- Removes v1 related zones, such as GiftCard and DraftOrder.
This commit is contained in:
Kasper Fabricius Kristensen
2024-11-14 19:32:36 +01:00
committed by GitHub
parent 79a3dc1e82
commit a153bc477c
3 changed files with 23 additions and 27 deletions

View File

@@ -4,6 +4,7 @@ import { useProductVariant } from "../../../hooks/api/products"
import { TwoColumnPageSkeleton } from "../../../components/common/skeleton"
import { TwoColumnPage } from "../../../components/layout/pages"
import { useDashboardExtension } from "../../../extensions"
import { VariantGeneralSection } from "./components/variant-general-section"
import {
InventorySectionPlaceholder,
@@ -28,6 +29,8 @@ export const ProductVariantDetail = () => {
}
)
const { getWidgets } = useDashboardExtension()
if (isLoading || !variant) {
return (
<TwoColumnPageSkeleton
@@ -49,12 +52,11 @@ export const ProductVariantDetail = () => {
hasOutlet
showJSON
showMetadata
// TODO: Add widgets zones for variant detail page
widgets={{
after: [],
before: [],
sideAfter: [],
sideBefore: [],
after: getWidgets("product_variant.details.after"),
before: getWidgets("product_variant.details.before"),
sideAfter: getWidgets("product_variant.details.side.after"),
sideBefore: getWidgets("product_variant.details.side.before"),
}}
>
<TwoColumnPage.Main>