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