-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
45 lines (39 loc) · 990 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// import { CognitoUser } from 'amazon-cognito-identity-js';
declare interface IUserContext {
isAuthenticated: boolean;
isLoading: boolean;
user?: any;
data: any;
handleLogin: (email: string, password: string) => void;
handleSignUp: (signupData: SignUpData) => Promise<UserAuth>;
handleLogout: () => void;
addBusiness: (business: Business) => void;
}
declare interface IPageProps {
loading: boolean;
vendors: Array<Vendor>;
setVendors: (vendors: Array<Vendor>) => void;
setError: (error: string) => void;
setLoading: (loading: boolean) => void;
error?: string;
}
declare interface LoadingDialogProps {
isLoading: boolean;
}
declare interface UserAuth {
user: CognitoUser | null;
isLoading: boolean;
isAuthenticated: boolean;
error: any;
}
declare interface SignUpData {
email: string;
password: string;
firstName: string;
lastName: string;
phoneNumber: string;
}
declare interface DealMessage {
dealType: string;
dealInfo: string;
}