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.

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

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

import { SingleColumnPage } from "../../../components/layout/pages"
import {
  RegionListView,
  RegionListDataTable,
  RegionListHeader,
  RegionListActions,
  RegionListTitle,
} from "./components/region-list-view"

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

export const RegionListPage = Object.assign(Root, {
  Table: RegionListView,
  Header: RegionListHeader,
  HeaderTitle: RegionListTitle,
  HeaderActions: RegionListActions,
  DataTable: RegionListDataTable,
})