ea614997a7
* 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>
12 lines
329 B
TypeScript
12 lines
329 B
TypeScript
import useSWR from 'swr'
|
|
|
|
import getAccountIds from 'api/wallets/getAccountIds'
|
|
|
|
export default function useAccountIds(address?: string, suspense = true) {
|
|
return useSWR(`wallets/${address}/account-ids`, () => getAccountIds(address), {
|
|
suspense: suspense,
|
|
fallback: [] as string[],
|
|
revalidateOnFocus: false,
|
|
})
|
|
}
|