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