Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

910 B
Raw Blame
import { ReactNode, Children } from "react"

import { WidgetZone } from "@mercurjs/dashboard-shared"

import { SingleColumnPage } from "../../../components/layout/pages"
import {
  ShippingProfileListView,
  ShippingProfileListDataTable,
  ShippingProfileListHeader,
  ShippingProfileListActions,
  ShippingProfileListTitle,
} from "./components/shipping-profile-list-view"

const Root = ({ children }: { children?: ReactNode }) => {
  return (
    <SingleColumnPage>
      <WidgetZone id="shipping-profiles.list">
        {Children.count(children) > 0 ? children : <ShippingProfileListView />}
      </WidgetZone>
    </SingleColumnPage>
  )
}

export const ShippingProfileListPage = Object.assign(Root, {
  Table: ShippingProfileListView,
  Header: ShippingProfileListHeader,
  HeaderTitle: ShippingProfileListTitle,
  HeaderActions: ShippingProfileListActions,
  DataTable: ShippingProfileListDataTable,
})