Skip to content

Commit

Permalink
Open TransactionModal from new dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed May 15, 2024
1 parent 1f6dbd9 commit f03702b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dapp/src/pages/DashboardPage/DashboardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import { TextMd } from "#/components/shared/Typography"
import IconTag from "#/components/shared/IconTag"
import { BoostArrowIcon } from "#/assets/icons"
import { CurrencyBalanceWithConversion } from "#/components/shared/CurrencyBalanceWithConversion"
import { AmountType } from "#/types"
import { AmountType, MODAL_TYPES } from "#/types"
import { ActivitiesList } from "#/components/shared/ActivitiesList"
import { useModal } from "#/hooks"

const buttonStyles: ButtonProps = {
size: "lg",
Expand All @@ -35,6 +36,9 @@ type DashboardCardProps = CardProps & {

export default function DashboardCard(props: DashboardCardProps) {
const { bitcoinAmount, positionPercentage, ...restProps } = props

const { openModal } = useModal()

return (
<Card px={5} py={10} gap={10} {...restProps}>
<CardHeader p={0} textAlign="center">
Expand Down Expand Up @@ -83,7 +87,12 @@ export default function DashboardCard(props: DashboardCardProps) {
</VStack>

<HStack w="full" justify="center" spacing={2}>
<Button {...buttonStyles}>Deposit More</Button>
<Button
{...buttonStyles}
onClick={() => openModal(MODAL_TYPES.STAKE, { type: "stake" })}
>
Deposit More
</Button>
<Button variant="outline" {...buttonStyles}>
Withdraw
</Button>
Expand Down

0 comments on commit f03702b

Please sign in to comment.