-
Notifications
You must be signed in to change notification settings - Fork 39
/
PackageCatalogOption.js
42 lines (38 loc) · 1.14 KB
/
PackageCatalogOption.js
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
import {
Grid,
GridItem,
Center
} from '@chakra-ui/react'
import { useNavigate, useLocation} from 'react-router';
const PackageCatalogOption = ({catalog}) => {
const navigate = useNavigate();
const handleCatalogForm = () => {
if (!catalog) {
navigate("/catalog")
}
}
return (
<Grid
templateAreas={`"catalog manual"`}
gridTemplateRows={'1fr'}
gridTemplateColumns={'1fr 1fr'}
h='100%'
w='100%'
color='blackAlpha.700'
fontWeight='bold'
gap={2}
>
<GridItem area={'catalog'}>
<Center border={catalog ? "2px": null} h="100%" w="100%" color='white' bg="#24BA27" p="2" onClick={handleCatalogForm}>
Catalog
</Center>
</GridItem>
<GridItem area={'manual'}>
<Center h="100%" w="100%" color='white' bg="#24BA27" p="2" onClick={ () => navigate("/enclave/create")}>
Manual
</Center>
</GridItem>
</Grid>
)
}
export default PackageCatalogOption;