* feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>
31 lines
918 B
TypeScript
31 lines
918 B
TypeScript
import { useParams } from 'react-router-dom'
|
|
|
|
import Intro from 'components/Intro'
|
|
import useStore from 'store'
|
|
|
|
export default function PortfolioIntro() {
|
|
const { address: urlAddress } = useParams()
|
|
const address = useStore((s) => s.address)
|
|
const isCurrentWalllet = !urlAddress || urlAddress === address
|
|
|
|
return (
|
|
<Intro
|
|
text={
|
|
!isCurrentWalllet ? (
|
|
<>
|
|
This is the <span className='text-white'>Portfolio</span> of the address{' '}
|
|
<span className='text-white'>{urlAddress}</span>. You can see all Credit Accounts of
|
|
this address, but you can't interact with them.
|
|
</>
|
|
) : (
|
|
<>
|
|
This is your <span className='text-white'>Portfolio</span>. Use it to get an overview
|
|
about all your Credit Accounts and their balances.
|
|
</>
|
|
)
|
|
}
|
|
bg='portfolio'
|
|
></Intro>
|
|
)
|
|
}
|