diff --git a/packages/frontend/.storybook/fake-utils.ts b/packages/frontend/.storybook/fake-utils.ts index 47675045f9..330acf95f6 100644 --- a/packages/frontend/.storybook/fake-utils.ts +++ b/packages/frontend/.storybook/fake-utils.ts @@ -120,7 +120,7 @@ export function imageDataUrl(options?: { const red = options?.color?.red ?? integer(0, 255); const green = options?.color?.green ?? integer(0, 255); const blue = options?.color?.blue ?? integer(0, 255); - const alpha = options?.color?.alpha ?? 0; + const alpha = options?.color?.alpha ?? 1; ctx.arc(canvas.width / 2, canvas.height / 2, canvas.width / 2, 0, Math.PI * 2, true); ctx.fillStyle = `rgba(${red}, ${green}, ${blue}, ${alpha})`; ctx.fill(); diff --git a/packages/frontend/src/pages/admin/custom-emojis-manager2.stories.impl.ts b/packages/frontend/src/pages/admin/custom-emojis-manager2.stories.impl.ts index 0e6852a342..21e84d4e47 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-manager2.stories.impl.ts +++ b/packages/frontend/src/pages/admin/custom-emojis-manager2.stories.impl.ts @@ -45,10 +45,8 @@ function createRender(params: { http.post('/api/admin/emoji/v2/list', async (req) => { await delay(100); - const bodyStream = req.request.body. - const body = req.body as entities.AdminEmojiV2ListRequest; - - console.log(req); + const bodyStream = req.request.body as ReadableStream; + const body = await new Response(bodyStream).json() as entities.AdminEmojiV2ListRequest; const emojis = params.emojis; const limit = body.limit ?? 10; @@ -72,8 +70,14 @@ export const Default = createRender({ emojis: [], }); -export const Max10 = createRender({ - emojis: [ - emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), - ], +export const List10 = createRender({ + emojis: Array.from({ length: 10 }, (_, i) => emoji({ name: `emoji_${i}` })), +}); + +export const List100 = createRender({ + emojis: Array.from({ length: 100 }, (_, i) => emoji({ name: `emoji_${i}` })), +}); + +export const List1000 = createRender({ + emojis: Array.from({ length: 1000 }, (_, i) => emoji({ name: `emoji_${i}` })), });