Fakultas Ilmu Komputer UI

types.ts 394 Bytes
Newer Older
1
2
import { ApiResponse } from 'services/api';
import { LoginResponse, RegistrationRequest, User } from 'services/auth/models';
3
4
5
6
7

export interface iUserContext {
  user: User;
  isAuthenticated: boolean;
  isLoading: boolean;
8
  signup: (data: RegistrationRequest) => ApiResponse<LoginResponse>;
9
10
11
12
  login: () => Promise<void>;
  loginWithGoogle: () => Promise<void>;
  logout: () => Promise<void>;
}