From eaa9b5142a190237a3a0142e766c150605c122ee Mon Sep 17 00:00:00 2001 From: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:06:15 -0500 Subject: [PATCH] refactor: remove circular dependency from `confirm-alert-model.tsx` (#30453) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR solves an issue with circular dependencies. It does not change the behavior of the application. It only rearranges functions/files to avoid circular references. --- development/circular-deps.jsonc | 8 +------- .../confirm-alert-modal/confirm-alert-modal.tsx | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/development/circular-deps.jsonc b/development/circular-deps.jsonc index ba7adad711e8..978ae552f535 100644 --- a/development/circular-deps.jsonc +++ b/development/circular-deps.jsonc @@ -6,10 +6,4 @@ // - To prevent new circular dependencies, ensure your changes don't add new cycles // - For more information contact the Extension Platform team. -[ - [ - "ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx", - "ui/components/app/alert-system/confirm-alert-modal/index.tsx", - "ui/pages/confirmations/components/confirm/footer/footer.tsx" - ] -] +[] diff --git a/ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx b/ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx index c0089b6d31ed..10a7fdb4d632 100644 --- a/ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx +++ b/ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx @@ -24,7 +24,7 @@ import { AlertModal } from '../alert-modal'; import { AcknowledgeCheckboxBase } from '../alert-modal/alert-modal'; import { MultipleAlertModal } from '../multiple-alert-modal'; import { MetaMetricsEventLocation } from '../../../../../shared/constants/metametrics'; -import { OnCancelHandler } from '../../../../pages/confirmations/components/confirm/footer/footer'; +import type { OnCancelHandler } from '../../../../pages/confirmations/components/confirm/footer/footer'; export type ConfirmAlertModalProps = { /** Callback function that is called when the cancel button is clicked. */