Skip to content

Commit

Permalink
added balance on header page
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalikKarpuk committed Dec 25, 2023
1 parent a10c4ed commit 8baed40
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/ui/src/components/organisms/pageHeader/Dollar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/ui/src/components/organisms/pageHeader/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@

.stakeButton {
margin-left: 20px;
}

.balance {
color: var(--col--gray1);
font-size: 12px;
display: flex;
align-items: center;
gap: 5px;
flex-grow: 1;
}
12 changes: 12 additions & 0 deletions apps/ui/src/components/organisms/pageHeader/pageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
import { useState } from 'react';
import Image from 'next/image';
import classNames from 'classnames';
import { Button } from '../../atoms/button';
import { Variant } from '../../atoms/button/types';
import { ConnectWalletButton } from '../../molecules/connectWalletButton';
import StakeModalController from '../../molecules/stakeModal/StakeModalController';
import useAuroWalletCore from '../../../hooks/useAuroWalletCore';
import useAddressBalance from '../../../hooks/useAddressBalance';
import DollarIcon from './Dollar.svg';

import style from './index.module.css';

const PageHeader = () => {
const [openStakeModul, setOpenStaekeModul] = useState<boolean>(false);
const [isDisableStakeButton, setIsDisableStakeButton] = useState(true);
const { accountId } = useAuroWalletCore();
const { balance } = useAddressBalance(accountId?.[0] ?? null);

return (
<div className={style.wrapper}>
<span className={classNames(style.balance, 't-inter-medium')}>
Balance:
<Image src={DollarIcon} alt="" /> {balance}
</span>
<ConnectWalletButton handleAddress={setIsDisableStakeButton} />
<Button
className={style.stakeButton}
Expand Down

0 comments on commit 8baed40

Please sign in to comment.