Skip to content

Commit d89ceb4

Browse files
authored
Merge pull request #623 from SELISEdigitalplatforms/stg
2 parents 019481f + dc1bdb2 commit d89ceb4

2 files changed

Lines changed: 2 additions & 23 deletions

File tree

src/features/auth/components/signin-form/signin-form.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { Button } from 'components/ui/button';
1010
import { UPasswordInput } from 'components/core/u-password-input';
1111
import { Captcha } from 'features/captcha';
1212
import { useAuthStore } from 'state/store/auth';
13-
import { useToast } from 'hooks/use-toast';
1413
import { useSigninMutation } from '../../hooks/use-auth';
1514
import ErrorAlert from '../../../../components/blocks/error-alert/error-alert';
1615
import { SignInResponse } from '../../services/auth.service';
@@ -60,7 +59,6 @@ export const SigninForm = ({ loginOption }: SigninProps) => {
6059
const navigate = useNavigate();
6160
const { t } = useTranslation();
6261
const { login } = useAuthStore();
63-
const { toast } = useToast();
6462
const [captchaToken, setCaptchaToken] = useState('');
6563
const [failedAttempts, setFailedAttempts] = useState(0);
6664
const [showCaptcha, setShowCaptcha] = useState(false);
@@ -102,11 +100,6 @@ export const SigninForm = ({ loginOption }: SigninProps) => {
102100
} else {
103101
login(res.access_token, res.refresh_token);
104102
navigate('/');
105-
toast({
106-
variant: 'success',
107-
title: t('SUCCESS'),
108-
description: t('LOGIN_SUCCESSFULLY'),
109-
});
110103
}
111104
} catch (_error) {
112105
if (captchaEnabled) {
@@ -128,13 +121,8 @@ export const SigninForm = ({ loginOption }: SigninProps) => {
128121
const res = await mutateAsync({ grantType: 'social', code, state });
129122
login(res.access_token, res.refresh_token);
130123
navigate('/');
131-
toast({
132-
variant: 'success',
133-
title: t('SUCCESS'),
134-
description: t('LOGIN_SUCCESSFULLY'),
135-
});
136124
},
137-
[login, mutateAsync, navigate, t, toast]
125+
[login, mutateAsync, navigate]
138126
);
139127

140128
useEffect(() => {

src/pages/main/dashboard/dashboard.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import {
77
} from 'features/dashboard';
88
import { Button } from 'components/ui/button';
99
import { useGetAccount } from 'features/profile/hooks/use-account';
10-
import { Dialog } from 'components/ui/dialog';
11-
import { EnableMfa } from 'features/profile';
1210
import { useTranslation } from 'react-i18next';
1311

1412
export function Dashboard() {
15-
const { data, isLoading } = useGetAccount();
13+
const { isLoading } = useGetAccount();
1614
const { t } = useTranslation();
1715

1816
return (
@@ -53,13 +51,6 @@ export function Dashboard() {
5351
</div>
5452
<DashboardSystemOverview />
5553
</div>
56-
{!data?.mfaEnabled &&
57-
!data?.isMfaVerified &&
58-
data?.email !== 'demo.construct@seliseblocks.com' && (
59-
<Dialog open={!data?.mfaEnabled}>
60-
<EnableMfa />
61-
</Dialog>
62-
)}
6354
</div>
6455
)}
6556
</>

0 commit comments

Comments
 (0)