mars-v2-frontend/src/hooks/useVaults.tsx

11 lines
240 B
TypeScript
Raw Normal View History

import useSWR from 'swr'
import getVaults from 'api/vaults/getVaults'
export default function useVaults(address?: string) {
return useSWR(`vaults${address}`, () => getVaults(), {
suspense: true,
revalidateOnFocus: false,
})
}