blob: febe31a4efa7d2979130e78c03bd033578c12940 (
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
|
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'
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>
<Voucher />
</LazyLoadComponent>
</>
)
}
export default PromoPage
|