diff options
| author | zyoshoka <107108195+zyoshoka@users.noreply.github.com> | 2024-05-01 16:39:16 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-01 16:39:16 +0900 |
| commit | 9c057e6854c22b4bc908485c08364a8a38091167 (patch) | |
| tree | ad9300276ca3e5213bdf6b3a4371cea614c70587 /packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts | |
| parent | Merge pull request from GHSA-2vxv-pv3m-3wvj (diff) | |
| download | misskey-9c057e6854c22b4bc908485c08364a8a38091167.tar.gz misskey-9c057e6854c22b4bc908485c08364a8a38091167.tar.bz2 misskey-9c057e6854c22b4bc908485c08364a8a38091167.zip | |
fix(frontend): fix Storybook type errors (#13779)
* fix(frontend): fix Storybook type errors
* fix: `hasReduce` doesn't work in args
Diffstat (limited to 'packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts')
| -rw-r--r-- | packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts | 6 |
1 files changed, 6 insertions, 0 deletions
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<typeof MkSignupServerRules>; @@ -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, }, |