1 import { CORE_LAYOUT_IDS } from "@medusajs/admin-shared"
2
3 import { LayoutComposer } from "../../../components/layout-composer"
4 import { useFeatureFlag } from "../../../providers/feature-flag-provider"
5 import { CustomerGroupListTable } from "./components/customer-group-list-table"
6 import { ConfigurableCustomerGroupListTable } from "./components/customer-group-list-table/configurable-customer-group-list-table"
7
8 export const CustomerGroupsList = () => {
9 const isViewConfigEnabled = useFeatureFlag("view_configurations")
10
11 return (
12 <LayoutComposer
13 widgetsZonePrefix="customer_group.list"
14 preferredLayoutId={CORE_LAYOUT_IDS.SINGLE_COLUMN}
15 sections={{
16 main: (
17 <LayoutComposer.Entry id="CustomerGroupListTable">
18 {isViewConfigEnabled ? (
19 <ConfigurableCustomerGroupListTable />
20 ) : (
21 <CustomerGroupListTable />
22 )}
23 </LayoutComposer.Entry>
24 ),
25 }}
26 />
27 )
28 }