Skip to content

Commit

Permalink
add see overview link
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykhoyda committed Aug 15, 2023
1 parent 5f3915f commit 5005c73
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/library/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ export const ButtonWithIcon = styled(Button)`
justify-content: center;
svg {
margin-right: 4px;
margin: 0 4px;
}
`
1 change: 1 addition & 0 deletions packages/ui/src/pages/Home/MultisigView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const SignatoriesWrapperStyled = styled('div')`
& > h2 {
margin-bottom: 0;
}
margin-left: 2rem;
`

Expand Down
60 changes: 42 additions & 18 deletions packages/ui/src/pages/Home/PureProxyHeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,70 @@ import MultisigActionMenu from './MultisigActionMenu'
import { styled } from '@mui/material/styles'
import { useGetBalance } from '../../hooks/useGetBalance'
import { useMultiProxy } from '../../contexts/MultiProxyContext'
import { ButtonWithIcon } from '../../components/library'
import { HiOutlineArrowLongRight } from 'react-icons/hi2'
import { useNavigate } from 'react-router-dom'

const PureProxyHeaderView = () => {
const navigate = useNavigate()
const { selectedMultiProxy, selectedHasProxy } = useMultiProxy()
const { balanceFormatted: pureProxyBalance } = useGetBalance({
address: selectedMultiProxy?.proxy || ''
})

if (!selectedHasProxy) return null

return (
<PureProxyWrapper>
{selectedHasProxy && (
<PureHeaderStyled>
<AccountDisplayStyled
iconSize={'large'}
address={selectedMultiProxy?.proxy || ''}
badge={AccountBadge.PURE}
/>
<BalanceStyled>
<BalanceHeaderStyled>Balance</BalanceHeaderStyled>
<BalanceAmountStyled>{pureProxyBalance}</BalanceAmountStyled>
</BalanceStyled>
<BoxStyled>
<MultisigActionMenu />
</BoxStyled>
</PureHeaderStyled>
)}
<OverviewWrapper>
<ButtonWithIcon
onClick={() => navigate('/help')}
variant="link"
>
See overview
<HiOutlineArrowLongRight size={24} />
</ButtonWithIcon>
</OverviewWrapper>
<PureHeaderStyled>
<AccountDisplayStyled
iconSize={'large'}
address={selectedMultiProxy?.proxy || ''}
badge={AccountBadge.PURE}
/>
<BalanceStyled>
<BalanceHeaderStyled>Balance</BalanceHeaderStyled>
<BalanceAmountStyled>{pureProxyBalance}</BalanceAmountStyled>
</BalanceStyled>
<BoxStyled>
<MultisigActionMenu />
</BoxStyled>
</PureHeaderStyled>
</PureProxyWrapper>
)
}

const PureProxyWrapper = styled('div')`
flex: 1;
min-width: 0;
border: 1px solid ${({ theme }) => theme.custom.text.borderColor};
border-radius: ${({ theme }) => theme.custom.borderRadius};
`

const OverviewWrapper = styled('div')`
height: 3rem;
display: flex;
justify-content: flex-end;
align-items: center;
background: ${({ theme }) => theme.custom.gray[300]};
border-top-right-radius: ${({ theme }) => theme.custom.borderRadius};
border-top-left-radius: ${({ theme }) => theme.custom.borderRadius};
`

const PureHeaderStyled = styled('div')`
display: flex;
flex-wrap: wrap;
margin: 0 0 1rem 0.5rem;
border: 1px solid ${({ theme }) => theme.custom.text.borderColor};
border-radius: ${({ theme }) => theme.custom.borderRadius};
padding: 1rem 1.3rem 1rem 0.625rem;
@media (min-width: ${({ theme }) => theme.breakpoints.values.md}px) {
Expand Down

0 comments on commit 5005c73

Please sign in to comment.