fix company creation for admin and inviting of new employees

This commit is contained in:
Danel Kungla
2025-07-31 12:27:30 +03:00
parent 87363051cd
commit a39c21e4e7
18 changed files with 496 additions and 57 deletions

View File

@@ -34,20 +34,18 @@ import {
import { Spinner } from '@kit/ui/spinner';
import { Trans } from '@kit/ui/trans';
import pathsConfig from '~/config/paths.config';
export function MultiFactorChallengeContainer({
paths,
userId,
}: React.PropsWithChildren<{
userId: string;
paths: {
redirectPath: string;
};
}>) {
const router = useRouter();
const verifyMFAChallenge = useVerifyMFAChallenge({
onSuccess: () => {
router.replace('/');
router.replace(pathsConfig.app.home);
},
});
@@ -206,6 +204,10 @@ function useVerifyMFAChallenge({ onSuccess }: { onSuccess: () => void }) {
});
if (response.error) {
console.warn(
{ error: response.error.message },
'Failed to verify MFA challenge',
);
throw response.error;
}