From 9c057e6854c22b4bc908485c08364a8a38091167 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Wed, 1 May 2024 16:39:16 +0900 Subject: fix(frontend): fix Storybook type errors (#13779) * fix(frontend): fix Storybook type errors * fix: `hasReduce` doesn't work in args --- .../frontend/src/components/MkSignupDialog.rules.stories.impl.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts') diff --git a/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts b/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts index fcd1ffde3e..9df3ec0c30 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts +++ b/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts @@ -51,13 +51,16 @@ export const Empty = { expect(buttons.at(-1)).toBeEnabled(); }, args: { + // @ts-expect-error serverRules is for test serverRules: [], tosUrl: null, }, decorators: [ (_, context) => ({ setup() { + // @ts-expect-error serverRules is for test instance.serverRules = context.args.serverRules; + // @ts-expect-error tosUrl is for test instance.tosUrl = context.args.tosUrl; onBeforeUnmount(() => { // FIXME: 呼び出されない @@ -76,6 +79,7 @@ export const ServerRulesOnly = { ...Empty, args: { ...Empty.args, + // @ts-expect-error serverRules is for test serverRules: [ 'ルール', ], @@ -85,6 +89,7 @@ export const TOSOnly = { ...Empty, args: { ...Empty.args, + // @ts-expect-error tosUrl is for test tosUrl: 'https://example.com/tos', }, } satisfies StoryObj; @@ -92,6 +97,7 @@ export const ServerRulesAndTOS = { ...Empty, args: { ...Empty.args, + // @ts-expect-error serverRules is for test serverRules: ServerRulesOnly.args.serverRules, tosUrl: TOSOnly.args.tosUrl, }, -- cgit v1.2.3-freya