1 import { CORE_LAYOUT_IDS } from "@medusajs/admin-shared"
2
3 import { LayoutComposer } from "../../../components/layout-composer"
4 import { useRequireRbacFeature } from "../../../hooks/use-require-rbac-feature"
5 import { PolicyListTable } from "./components/policy-list-table"
6
7 export const PolicyList = () => {
8 const isRbacEnabled = useRequireRbacFeature()
9
10 if (!isRbacEnabled) {
11 return null
12 }
13
14 return (
15 <LayoutComposer
16 widgetsZonePrefix="policy.list"
17 preferredLayoutId={CORE_LAYOUT_IDS.SINGLE_COLUMN}
18 sections={{
19 main: (
20 <LayoutComposer.Entry id="PolicyListTable">
21 <PolicyListTable />
22 </LayoutComposer.Entry>
23 ),
24 }}
25 />
26 )
27 }