diff --git a/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx b/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx index 766749289..e028468d9 100644 --- a/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx @@ -37,7 +37,7 @@ import { useFetchDocumentByIdMutation } from 'features/apps/apiSlice' import CommonService from 'services/CommonService' import type { UseCaseType } from 'features/appManagement/types' import type { RootState } from 'features/store' - +import { resetDialog } from 'features/overlay/slice' export interface AppDetailHeaderProps { item: AppDetails } @@ -74,6 +74,12 @@ export default function AppDetailHeader({ item }: AppDetailHeaderProps) { } } + useEffect(() => { + return () => { + dispatch(resetDialog()) + } + }, [dispatch]) + useEffect(() => { if (isDialogConfirmed) { setButtonLabel(t('content.appdetail.requested')) diff --git a/src/features/overlay/slice.ts b/src/features/overlay/slice.ts index 6483b0122..9bc30780f 100644 --- a/src/features/overlay/slice.ts +++ b/src/features/overlay/slice.ts @@ -43,6 +43,7 @@ const dialog = createSlice({ }, resetDialog: (state) => { state.isConfirmed = false + state.isOpen = false }, }, })