/
types.ts
168 lines (155 loc) · 3.57 KB
/
types.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// ClientName type to list all the client names
export type ClientName =
| "all"
| "2117 (Non-Tribe)"
| "Alpha Kongs Club"
| "Ape Reunion"
| "Beanbag Frens (Non-Tribe)"
| "Bears Deluxe"
| "Blokpax"
| "Brawler Bearz"
| "Bushleague Media"
| "CPG (Non-Tribe)"
| "Chibi Dinos"
| "Degen Distillery"
| "DogePound"
| "Fat Rat Mafia (Non-Tribe)"
| "Fear City"
| "Freckle Trivia"
| "GQ"
| "GQ3"
| "Gala Games"
| "Gas Guzzlers"
| "Hero Galaxy"
| "Killabears"
| "Kitaro World"
| "Kryptoria"
| "LALA"
| "Long Lost"
| "Moonrunners"
| "Noundles"
| "OD Labs"
| "Orbies"
| "RDB Car Club"
| "SYKY"
| "Sammy Arriaga"
| "Saved Souls"
| "Shadow Quest"
| "Shellz Orb"
| "Skale (Team)"
| "Soundxyz"
| "Space Riders"
| "SupDucks"
| "Superlotl"
| "TRIBE TEST ACCOUNT"
| "TRIBENFT Co."
| "The Fabricant"
| "ThreadGuy"
| "Uncanny Club"
| "VaynerSports"
| "Wild West Undead"
| "m00m"
| "nftnow";
/** Represents an individual user's leaderboard data */
export interface LeaderboardData {
username: string;
has_badge: boolean;
twitter_points: number;
content_points: number;
total_points: number;
}
/** Options to customize the leaderboard fetch */
export interface LeaderboardOptions {
timePeriod?: "" | "week" | "month";
trial?: boolean;
badgeFilter?: boolean;
limit?: number;
}
/** Props for the Leaderboard component */
export interface LeaderboardProps extends LeaderboardOptions {
client: ClientName;
className?: string;
errorClassName?: string;
loadingClassName?: string;
tableClassName?: string;
headerClassName?: string;
rowClassName?: string;
badgeClassName?: string;
titleClassName?: string;
textClassName?: string;
badge_icon?: string;
style?: React.CSSProperties;
}
/** Response format for the leaderboard API */
export interface LeaderboardResponse {
data: LeaderboardData[];
}
/** Represents an individual client's data */
export interface ClientData {
client: ClientName;
trial: boolean;
avatar: string;
background: string;
is_hidden: boolean;
}
/** Response format for the client list API */
export interface ClientListResponse {
data: ClientData[];
}
/** Response format for the public client user list API */
export interface PublicClientUserListResponse {
data: string[];
}
/** Response format for the error API */
export interface ErrorResponse {
data: {
error: string;
};
}
/** Represents a client */
export interface Client {
client: ClientName;
trial: boolean;
avatar: string;
background: string;
is_hidden: boolean;
}
/** Props for the ClientList component */
export interface ClientListProps {
clients?: ClientData[];
className?: string;
clientClassName?: string;
avatarClassName?: string;
backgroundClassName?: string;
textClassName?: string;
style?: React.CSSProperties;
}
/** Props for the user list */
export interface UserListProps {
containerClassName?: string;
userClassName?: string;
textClassName?: string;
style?: React.CSSProperties;
}
/** Props for the client card */
export interface ClientCardProps {
client: ClientName;
cardClassName?: string;
bannerClassName?: string;
avatarClassName?: string;
nameClassName?: string;
style?: React.CSSProperties;
}
/** Props for the client profile */
export interface ClientProfileProps {
client: ClientName;
containerClassName?: string;
bannerClassName?: string;
avatarClassName?: string;
leaderboardClassName?: string;
nameClassName?: string;
userListClassName?: string;
userContainerClassName?: string;
userClassName?: string;
style?: React.CSSProperties;
}