-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.ts
297 lines (292 loc) · 7.61 KB
/
data.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
import { faker } from '@faker-js/faker'
import type { Message, Server } from './types'
faker.seed(123)
export const data: Server[] = [
{
id: '1',
label: 'Tailwind CSS',
img: 'tailwind.png',
categories: [
{
id: '1',
label: '',
channels: [
{
id: '1',
label: 'welcome',
description:
'Introduction to the Tailwind CSS framework and community.',
icon: 'ic:baseline-library-books',
messages: getMessages(),
},
{
id: '2',
label: 'announcements',
icon: 'heroicons-solid:speakerphone',
messages: getMessages(),
},
],
},
{
id: '2',
label: 'Tailwind CSS',
channels: [
{
id: '3',
label: 'general',
description:
'General discussion of Tailwind CSS (please move off-topic discussion in the off-topic channels).',
unread: true,
messages: getMessages(),
},
{
id: '4',
label: 'plugins',
description: 'Tailwind CSS plugins.',
unread: true,
messages: getMessages(),
},
{
id: '5',
label: 'help',
description:
'Help with Tailwind CSS and build process integration.',
unread: true,
messages: getMessages(),
},
{
id: '6',
label: 'internals',
description: 'Development of the Tailwind CSS framework itself.',
messages: getMessages(),
},
],
},
{
id: '3',
label: 'Tailwind Labs',
channels: [
{
id: '7',
label: 'tailwind-ui',
description: 'General discussion of Tailwind UI.',
messages: getMessages(),
},
{
id: '8',
label: 'headless-ui',
description: 'General discussion of Headless UI.',
messages: getMessages(),
},
{
id: '9',
label: 'refactoring-ui',
description: 'General discussion of Refactoring UI.',
unread: true,
messages: getMessages(),
},
{
id: '10',
label: 'heroicons',
description: 'General discussion of Heroicons.',
unread: true,
messages: getMessages(),
},
],
},
{
id: '4',
label: 'Off topic',
channels: [
{
id: '11',
label: 'design',
description: 'General discussion of web design.',
messages: getMessages(),
},
{
id: '12',
label: 'development',
description: 'General discussion of web development.',
messages: getMessages(),
},
{
id: '13',
label: 'random',
description: 'General discussion of everything else!',
unread: true,
messages: getMessages(),
},
],
},
{
id: '5',
label: 'Community',
channels: [
{
id: '14',
label: 'jobs',
description:
'Job board. Please put [HIRING] or [FOR HIRE] at the beginning of your post.',
messages: getMessages(),
},
{
id: '15',
label: 'showcase',
description: 'Share your projects built with Tailwind CSS!',
unread: true,
messages: getMessages(),
},
{
id: '16',
label: 'bots',
description: 'Bot spam containment.',
messages: getMessages(),
},
],
},
],
},
{
id: '2',
label: 'Next.js',
img: 'next.png',
categories: [
{
id: '6',
label: '',
channels: [
{
id: '17',
label: 'welcome',
icon: 'ic:baseline-library-books',
messages: getMessages(),
},
{
id: '18',
label: 'announcements',
icon: 'heroicons-solid:speakerphone',
description:
'Announcements related to this Discord server and Next.js',
messages: getMessages(),
},
{
id: '19',
label: 'introductions',
unread: true,
description:
'Welcome to the server! Feel free to introduce yourself',
messages: getMessages(),
},
],
},
{
id: '7',
label: 'Need-Help',
channels: [
{
id: '20',
label: 'community-help',
description:
'Members of the community can help each other here, but we recommend checking GitHub discussions first: ',
messages: getMessages(),
},
],
},
{
id: '8',
label: 'Community',
channels: [
{
id: '21',
label: 'general',
icon: 'solar:hashtag-chat-bold',
description: 'Discussions about Next.js in general',
messages: getMessages(),
},
{
id: '22',
label: 'off-topic',
unread: true,
description:
'Discussions about topics not related to Next.js or other channels',
messages: getMessages(),
},
{
id: '23',
label: 'showcase',
unread: true,
messages: getMessages(),
},
{
id: '24',
label: 'jobs-board',
description:
'Is your company looking for Next.js developers? Discuss here!',
messages: getMessages(),
},
{
id: '25',
label: 'hire-me',
unread: true,
description: 'Are you a developer looking to work with Next.js?',
messages: getMessages(),
},
{
id: '26',
label: 'makers',
description:
'Share as you build in public. Welcoming all makers and indie hackers.',
messages: getMessages(),
},
{
id: '27',
label: 'moderation-feedback',
description:
'Discussion about this Discord server and moderation topics',
messages: getMessages(),
},
],
},
],
},
{
id: '3',
label: 'Mirage JS',
img: 'mirage.png',
categories: [
{
id: '9',
label: 'Text Channels',
channels: [
{ id: '28', label: 'general', messages: getMessages() },
{ id: '29', label: 'graphql', unread: true, messages: getMessages() },
{
id: '30',
label: 'typescript',
unread: true,
messages: getMessages(),
},
],
},
],
},
]
function getMessages(): Message[] {
return [...Array(faker.number.int({ min: 7, max: 25 }))]
.map(() => {
const user = faker.internet.userName()
const avatarUrl = `/avatars/${faker.number.int({
min: 0,
max: 25,
})}.jpg`
return [...Array(faker.number.int({ min: 1, max: 4 }))].map(() => ({
id: faker.string.nanoid(),
user,
avatarUrl,
date: new Date(faker.date.past()).toLocaleString(),
text: faker.lorem.sentences(3),
}))
})
.flat()
}