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 { CustomerListTable } from "./components/customer-list-table"
6 import { ConfigurableCustomerListTable } from "./components/customer-list-table/configurable-customer-list-table"
7
8 export const CustomersList = () => {
9 const isViewConfigEnabled = useFeatureFlag("view_configurations")
10
11 return (
12 <LayoutComposer
13 widgetsZonePrefix="customer.list"
14 preferredLayoutId={CORE_LAYOUT_IDS.SINGLE_COLUMN}
15 sections={{
16 main: (
17 <LayoutComposer.Entry id="CustomerListTable">
18 {isViewConfigEnabled ? (
19 <ConfigurableCustomerListTable />
20 ) : (
21 <CustomerListTable />
22 )}
23 </LayoutComposer.Entry>
24 ),
25 }}
26 />
27 )
28 }