Fixed useFetch and useUser typing
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { initialUser } from '../../api/user'
|
||||
import { User } from '../../api/user/types'
|
||||
import { UseFetchErrored, UseFetchSucced } from '../useFetch'
|
||||
import { UseFetchReturn } from '../useFetch'
|
||||
|
||||
const useUser = (): UseFetchSucced<User> | UseFetchErrored => (
|
||||
const useUser = (): UseFetchReturn<User> => (
|
||||
// useFetch(
|
||||
// composeUserUrl(getToken()),
|
||||
// 'GET',
|
||||
@@ -16,6 +16,7 @@ const useUser = (): UseFetchSucced<User> | UseFetchErrored => (
|
||||
data: initialUser,
|
||||
loading: false,
|
||||
error: null,
|
||||
setData: () => {0}
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user