Skip to content

Commit

Permalink
Merge pull request #220 from GTBitsOfGood/ash/210-addToReportVisibility
Browse files Browse the repository at this point in the history
ash/210-addToReportVisibility
  • Loading branch information
avayedawadi authored Oct 29, 2023
2 parents df4d6ec + 8973d0d commit 42af3ca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
25 changes: 13 additions & 12 deletions src/components/StandardCard/StandardCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,19 @@ const StandardCard = ({ card, cards, setCards, ...props }) => {
}
})}
</Flex>
<Button
variant={selected ? "Grey" : "Blue-outlined"}
onClick={reportAddHandler}
flexGrow={0}
flexShrink={0}
whiteSpace="nowrap"
// {...props}
w="35%"
isDisabled={user?.isLoggedIn ? false : true}
>
{!selected ? "Add To Report" : "Del From Report"}
</Button>
{user?.isLoggedIn && (
<Button
variant={selected ? "Grey" : "Blue-outlined"}
onClick={reportAddHandler}
flexGrow={0}
flexShrink={0}
whiteSpace="nowrap"
// {...props}
w="35%"
>
{!selected ? "Add To Report" : "Del From Report"}
</Button>
)}
</HStack>

<CardModalWithForm
Expand Down
26 changes: 14 additions & 12 deletions src/components/StandardCard/StandardCardSmall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,20 @@ const StandardCard = ({ card, cards, setCards, ...props }) => {
</Flex>

{/* <ReportButton /> */}
<Button
variant={selected ? "Grey" : "Blue-outlined"}
onClick={reportAddHandler}
flexGrow={0}
flexShrink={0}
{...props}
fontSize="3xs"
size="sm"
isDisabled={user?.isLoggedIn ? false : true}
>
{!selected ? "Add To Report" : "Del From Report"}
</Button>
{user?.isLoggedIn && (
<Button
variant={selected ? "Grey" : "Blue-outlined"}
onClick={reportAddHandler}
flexGrow={0}
flexShrink={0}
{...props}
fontSize="3xs"
size="sm"
isDisabled={user?.isLoggedIn ? false : true}
>
{!selected ? "Add To Report" : "Del From Report"}
</Button>
)}
</HStack>

<CardModalWithForm
Expand Down

1 comment on commit 42af3ca

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for southface ready!

✅ Preview
https://southface-ah0tgtzv6-bitsofgood.vercel.app

Built with commit 42af3ca.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.