Added api/user request prototype
This commit is contained in:
22
front/src/hooks/api/useUser.ts
Normal file
22
front/src/hooks/api/useUser.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { initialUser } from '../../api/user'
|
||||
import { User } from '../../api/user/types'
|
||||
import { UseFetchErrored, UseFetchSucced } from '../useFetch'
|
||||
|
||||
const useUser = (): UseFetchSucced<User> | UseFetchErrored => (
|
||||
// useFetch(
|
||||
// composeUserUrl(getToken()),
|
||||
// 'GET',
|
||||
// true,
|
||||
// isUserResponse,
|
||||
// processUser,
|
||||
// initialUser
|
||||
// )
|
||||
|
||||
{
|
||||
data: initialUser,
|
||||
loading: false,
|
||||
error: null,
|
||||
}
|
||||
)
|
||||
|
||||
export default useUser
|
Reference in New Issue
Block a user