mars-v2-frontend/src/hooks/useDepositedVaults.ts

11 lines
307 B
TypeScript

import useSWR from 'swr'
import getDepositedVaults from 'api/vaults/getDepositedVaults'
export default function useDepositedVaults(accountId: string) {
return useSWR(`depositedVaultsByAccount-${accountId}`, () => getDepositedVaults(accountId), {
suspense: true,
revalidateOnFocus: false,
})
}