blob: 03c9786a270f2c6fb875571a505fbd902b7d9793 (
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
|
"use client";
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, useDisclosure } from '@nextui-org/react'
import { MoreVerticalIcon } from 'lucide-react'
import React from 'react'
import ImportModal from './ImportModal';
import ProductModal from './ProductModal';
import getClientCredential from '@/common/libs/getClientCredential';
const MoreMenu = () => {
const credential = getClientCredential()
const importModal = useDisclosure();
const productModal = useDisclosure();
return credential && credential.team == 'VERIFICATION' && (
<>
<Dropdown>
<DropdownTrigger>
<Button variant="flat" className="px-2.5 min-w-fit">
<MoreVerticalIcon size={20} />
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem key="product" onPress={productModal.onOpen}>
Product List
</DropdownItem>
<DropdownItem key="import" onPress={importModal.onOpen}>
Import Product
</DropdownItem>
</DropdownMenu>
</Dropdown>
<ProductModal modal={productModal} />
<ImportModal modal={importModal} />
</>
)
}
export default MoreMenu
|