Skip to content

Commit

Permalink
Merge pull request #296 from DAOmasons/grantsDisplays
Browse files Browse the repository at this point in the history
hide facilitator approve until needed
  • Loading branch information
jordanlesich authored Aug 9, 2024
2 parents 8cf1213 + 9dbfd10 commit 7f2644e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/components/grant/FacilitatorActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@ import { Button, Stack, Text } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { IconPlus } from '@tabler/icons-react';
import { FacilitatorApprovalDrawer } from './FacilitatorApprovalDrawer';
import { useGrant } from '../../hooks/useGrant';
import { GameStatus, GrantStatus } from '../../types/common';

export const FacilitatorActions = () => {
const [approvalOpened, { open: openApprove, close: closeApprove }] =
useDisclosure();

const { grant } = useGrant();

const isReadyToApprove = grant?.status === GrantStatus.MilestonesApproved;
return (
<>
<Stack pos="fixed" top={'260px'} gap="sm">
<Button variant="menu" leftSection={<IconPlus />} onClick={openApprove}>
<Text>Review Grantee</Text>
</Button>
{isReadyToApprove && (
<Button
variant="menu"
leftSection={<IconPlus />}
onClick={openApprove}
>
<Text>Review Grantee</Text>
</Button>
)}
</Stack>
<FacilitatorApprovalDrawer
opened={approvalOpened}
Expand Down

0 comments on commit 7f2644e

Please sign in to comment.