10 lines
210 B
TypeScript
10 lines
210 B
TypeScript
|
import useSWR from 'swr'
|
||
|
|
||
|
import getVaults from 'api/vaults/getVaults'
|
||
|
|
||
|
export default function useVaults(address?: string) {
|
||
|
return useSWR(`vaults${address}`, () => getVaults(), {
|
||
|
suspense: true,
|
||
|
})
|
||
|
}
|