-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.d.ts
49 lines (46 loc) · 895 Bytes
/
global.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
46
47
48
49
export {};
declare global {
interface LoginModalProps {
isOpen: boolean;
handleClose: () => void;
}
interface Providers {
[key: string]: ProviderInfo;
}
interface Params {
id: string;
name?: string;
}
interface Post {
_id?: string;
creator?: Creator;
name: string;
pronunciation: string;
meaning: string;
}
interface Creator {
_id: string;
email: string;
image: string;
username: string;
}
interface ProfileProps {
title: string;
desc: string;
data: Post[];
handleDelete: (post: Post) => Promise<void>;
handleEdit: (post: Post) => Promise<void>;
}
interface PostCardProps {
post: Post;
handleDelete?: () => void;
handleEdit?: () => void;
}
interface FormProps {
type: string;
post: Post;
setPost: Dispatch<SetStateAction<Post>>;
submitting: boolean;
handleSubmit: (e: { preventDefault: () => void }) => Promise<void>;
}
}