Fix SWR key logic

This commit is contained in:
DaneEveritt 2022-07-04 18:22:58 -04:00
parent d6b6ac6dab
commit 26d7d7e0e0
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 41 additions and 22 deletions

View file

@ -1,11 +1,11 @@
import useSWR, { ConfigInterface } from 'swr';
import useUserSWRContentKey from '@/plugins/useUserSWRContentKey';
import http, { FractalResponseList } from '@/api/http';
import { SSHKey, Transformers } from '@definitions/user';
import { AxiosError } from 'axios';
import { useUserSWRKey } from '@/plugins/useSWRKey';
const useSSHKeys = (config?: ConfigInterface<SSHKey[], AxiosError>) => {
const key = useUserSWRContentKey(['account', 'ssh-keys']);
const key = useUserSWRKey(['account', 'ssh-keys']);
return useSWR(
key,