Skip to content

Commit

Permalink
fix: move gap property to another component (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
rozanagy authored Oct 23, 2024
1 parent 636ec8e commit 370bda9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Divider, HStack, VStack } from '@chakra-ui/react';
import { HStack, VStack } from '@chakra-ui/react';
import { VaultState } from 'dlc-btc-lib/models';

import { VaultExpandedInformationButton } from './components/vault.details.button-group.button';
Expand Down Expand Up @@ -36,8 +36,7 @@ export function VaultExpandedInformationButtonGroup({

return (
<VStack w={'100%'}>
<Divider w={'100%'} borderColor={'grey.01'} borderStyle={'dashed'} />
<HStack w={'100%'} justifyContent={'space-between'}>
<HStack w={'100%'} justifyContent={'space-between'} pt={'10px'}>
<VaultExpandedInformationButton
label={'Mint dlcBTC'}
onClick={handleDepositClick}
Expand Down
40 changes: 22 additions & 18 deletions src/app/components/vault/vault.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useContext, useState } from 'react';
import { useDispatch } from 'react-redux';

import { VStack } from '@chakra-ui/react';
import { Vault as VaultModel } from '@models/vault';
import { BitcoinTransactionConfirmationsContext } from '@providers/bitcoin-query-provider';
import { mintUnmintActions } from '@store/slices/mintunmint/mintunmint.actions';
Expand Down Expand Up @@ -36,24 +37,27 @@ export function Vault({ vault, variant }: VaultProps): React.JSX.Element {
return (
<VaultLayout>
<VaultHeader vaultUUID={vault.uuid} vaultCreationTimestamp={vault.timestamp} />
<VaultMainStack
vaultState={vault.state}
vaultTotalLockedValue={vault.valueLocked}
vaultTotalMintedValue={vault.valueMinted}
isVaultExpanded={isVaultExpanded}
variant={variant}
handleButtonClick={handleMainButtonClick}
/>
<VaultDetails
variant={variant}
vaultUUID={vault.uuid}
vaultState={vault.state}
vaultTotalLockedValue={vault.valueLocked}
vaultTotalMintedValue={vault.valueMinted}
isVaultExpanded={isVaultExpanded}
vaultFundingTX={vault.fundingTX}
vaultWithdrawDepositTX={vault.withdrawDepositTX}
/>
<VStack width={'100%'} gap={'0px'}>
<VaultMainStack
vaultState={vault.state}
vaultTotalLockedValue={vault.valueLocked}
vaultTotalMintedValue={vault.valueMinted}
isVaultExpanded={isVaultExpanded}
variant={variant}
handleButtonClick={handleMainButtonClick}
/>
<VaultDetails
variant={variant}
vaultUUID={vault.uuid}
vaultState={vault.state}
vaultTotalLockedValue={vault.valueLocked}
vaultTotalMintedValue={vault.valueMinted}
isVaultExpanded={isVaultExpanded}
vaultFundingTX={vault.fundingTX}
vaultWithdrawDepositTX={vault.withdrawDepositTX}
/>
</VStack>

<VaultProgressBar
bitcoinTransactionConfirmations={confirmations}
vaultState={vault.state}
Expand Down

0 comments on commit 370bda9

Please sign in to comment.