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