diff --git a/dictation_client/src/components/delegate/index.tsx b/dictation_client/src/components/delegate/index.tsx index c5d18e7..1bfce9e 100644 --- a/dictation_client/src/components/delegate/index.tsx +++ b/dictation_client/src/components/delegate/index.tsx @@ -21,10 +21,16 @@ export const DelegationBar: React.FC = (): JSX.Element => { const navigate = useNavigate(); const onClickExit = useCallback(() => { + if ( + /* eslint-disable-next-line no-alert */ + !window.confirm(t(getTranslationID("common.message.dialogConfirm"))) + ) { + return; + } dispatch(clearDelegationToken()); dispatch(cleanupDelegateAccount()); navigate("/partners"); - }, [dispatch, navigate]); + }, [dispatch, navigate, t]); return (
diff --git a/dictation_client/src/pages/PartnerPage/index.tsx b/dictation_client/src/pages/PartnerPage/index.tsx index 17b95b7..7f73f66 100644 --- a/dictation_client/src/pages/PartnerPage/index.tsx +++ b/dictation_client/src/pages/PartnerPage/index.tsx @@ -92,6 +92,12 @@ const PartnerPage: React.FC = (): JSX.Element => { // 代理操作開始処理 const startDealerManagement = useCallback( async (delegatedAccountId: number, delegatedCompanyName: string) => { + if ( + /* eslint-disable-next-line no-alert */ + !window.confirm(t(getTranslationID("common.message.dialogConfirm"))) + ) { + return; + } dispatch( changeDelegateAccount({ delegatedAccountId, delegatedCompanyName }) ); @@ -100,7 +106,7 @@ const PartnerPage: React.FC = (): JSX.Element => { navigate("/user"); } }, - [dispatch, navigate] + [dispatch, navigate, t] ); // HTML