Refactor dialog old component states (#13186)

This PR refactors dialog old component state management.
This commit is contained in:
Lucas Bordeau
2025-07-15 11:32:16 +02:00
committed by GitHub
parent 1a81e43286
commit 3698c683db
17 changed files with 88 additions and 153 deletions
@@ -1,11 +1,14 @@
import { useDialogManagerScopedStates } from '../hooks/internal/useDialogManagerScopedStates';
import { dialogInternalComponentState } from '@/ui/feedback/dialog-manager/states/dialogInternalComponentState';
import { useDialogManager } from '../hooks/useDialogManager';
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
import { Dialog } from './Dialog';
import { DialogManagerEffect } from './DialogManagerEffect';
export const DialogManager = ({ children }: React.PropsWithChildren) => {
const { dialogInternal } = useDialogManagerScopedStates();
const dialogInternal = useRecoilComponentValueV2(
dialogInternalComponentState,
);
const { closeDialog } = useDialogManager();
return (