From ed8eabb246edf731d31adffbe3c77c539e53ae9e Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Fri, 6 Sep 2024 18:37:18 +0900 Subject: [PATCH] fix storybook instance imports --- .../frontend/src/components/MkDonation.stories.impl.ts | 7 +++++-- .../src/components/MkSignupDialog.rules.stories.impl.ts | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/MkDonation.stories.impl.ts b/packages/frontend/src/components/MkDonation.stories.impl.ts index 94fca7a8fe..5da2d03806 100644 --- a/packages/frontend/src/components/MkDonation.stories.impl.ts +++ b/packages/frontend/src/components/MkDonation.stories.impl.ts @@ -5,9 +5,12 @@ import { action } from '@storybook/addon-actions'; import { StoryObj } from '@storybook/vue3'; -import { onBeforeUnmount } from 'vue'; +import { onBeforeUnmount, inject } from 'vue'; import MkDonation from './MkDonation.vue'; -import { instance } from '@/server-metadata.js'; +import { DI } from '@/di.js'; + +const instance = inject(DI.serverMetadata)!; + export const Default = { render(args) { return { diff --git a/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts b/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts index fb2cdb4d30..72107696c9 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts +++ b/packages/frontend/src/components/MkSignupDialog.rules.stories.impl.ts @@ -6,10 +6,13 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */ import { expect, userEvent, waitFor, within } from '@storybook/test'; import { StoryObj } from '@storybook/vue3'; -import { onBeforeUnmount } from 'vue'; +import { onBeforeUnmount, inject } from 'vue'; import MkSignupServerRules from './MkSignupDialog.rules.vue'; import { i18n } from '@/i18n.js'; -import { instance } from '@/server-metadata.js'; +import { DI } from '@/di.js'; + +const instance = inject(DI.serverMetadata)!; + export const Empty = { render(args) { return {