From 971c6d9accee7e808715e01371ad06d7bcae29c1 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 18 Sep 2024 14:12:52 +0800 Subject: [PATCH] fix: circular deps warning by rollup --- .../common/components/PreviewFormBanner/PreviewFormBanner.tsx | 3 ++- .../admin-form/template/UseTemplateModal/UseTemplateModal.tsx | 3 ++- .../workspace/components/CreateFormModal/CreateFormModal.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/admin-form/common/components/PreviewFormBanner/PreviewFormBanner.tsx b/frontend/src/features/admin-form/common/components/PreviewFormBanner/PreviewFormBanner.tsx index 6e951025c9..488ec5499b 100644 --- a/frontend/src/features/admin-form/common/components/PreviewFormBanner/PreviewFormBanner.tsx +++ b/frontend/src/features/admin-form/common/components/PreviewFormBanner/PreviewFormBanner.tsx @@ -27,7 +27,8 @@ import Link from '~components/Link' import { UseTemplateModal } from '~features/admin-form/template/UseTemplateModal' import { useEnv } from '~features/env/queries' import { usePublicFormContext } from '~features/public-form/PublicFormContext' -import { DuplicateFormModal } from '~features/workspace/components/DuplicateFormModal' +// Explicit import to avoid circular dependency warnings by rollup +import { DuplicateFormModal } from '~features/workspace/components/DuplicateFormModal/DuplicateFormModal' export const StickyPreviewHeader = ({ isOpen, diff --git a/frontend/src/features/admin-form/template/UseTemplateModal/UseTemplateModal.tsx b/frontend/src/features/admin-form/template/UseTemplateModal/UseTemplateModal.tsx index 91a58ddede..23992634b3 100644 --- a/frontend/src/features/admin-form/template/UseTemplateModal/UseTemplateModal.tsx +++ b/frontend/src/features/admin-form/template/UseTemplateModal/UseTemplateModal.tsx @@ -7,7 +7,8 @@ import { import { ModalCloseButton } from '~components/Modal' -import { CreateFormModalContent } from '~features/workspace/components/CreateFormModal/CreateFormModalContent' +// Explicit import to avoid circular dependency warnings by rollup +import { CreateFormModalContent } from '~features/workspace/components/CreateFormModal/CreateFormModalContent/CreateFormModalContent' import { UseTemplateWizardProvider } from './UseTemplateWizardProvider' diff --git a/frontend/src/features/workspace/components/CreateFormModal/CreateFormModal.tsx b/frontend/src/features/workspace/components/CreateFormModal/CreateFormModal.tsx index 9ee97c48d1..671ef30307 100644 --- a/frontend/src/features/workspace/components/CreateFormModal/CreateFormModal.tsx +++ b/frontend/src/features/workspace/components/CreateFormModal/CreateFormModal.tsx @@ -7,7 +7,8 @@ import { import { ModalCloseButton } from '~components/Modal' -import { CreateFormModalContent } from './CreateFormModalContent' +// Explicit import to avoid circular dependency warnings by rollup +import { CreateFormModalContent } from './CreateFormModalContent/CreateFormModalContent' import { CreateFormWizardProvider } from './CreateFormWizardProvider' export type CreateFormModalProps = Pick<