blob: 689c2537cf911931eaa293f3881f1b80d12d3571 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import dynamic from 'next/dynamic';
import React, { useState } from 'react';
import { LazyLoadComponent } from 'react-lazy-load-image-component';
import Hero from '~/modules/promo/components/Hero';
import PromotionProgram from '~/modules/promo/components/PromotinProgram';
import Voucher from '~/modules/promo/components/Voucher';
import FlashSale from '../../../modules/promo/components/FlashSale';
import FlashSaleNonDisplay from '../../../modules/promo/components/FlashSaleNonDisplay';
const PromoList = dynamic(
() => import('../../../modules/promo/components/PromoList')
);
const PromoPage = () => {
const [selectedPromo, setSelectedPromo] = useState('Bundling');
return (
<>
<LazyLoadComponent>
<Hero />
</LazyLoadComponent>
<LazyLoadComponent>
<PromotionProgram
selectedPromo={selectedPromo}
onSelectPromo={setSelectedPromo}
/>
<PromoList selectedPromo={selectedPromo} />
</LazyLoadComponent>
<LazyLoadComponent>
<FlashSale />
</LazyLoadComponent>
<h1 className='h-1'></h1>
<LazyLoadComponent>
<FlashSaleNonDisplay />
</LazyLoadComponent>
<h1 className='h-1'></h1>
<LazyLoadComponent>
<Voucher />
</LazyLoadComponent>
</>
);
};
export default PromoPage;
|