fix registration on production
This commit is contained in:
@ -29,6 +29,7 @@ import {
|
||||
isNotificationsEnabled,
|
||||
getNotifPositionFromSettings,
|
||||
} from '../utils/notifications';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
const ColorlibConnector = styled(StepConnector)(({ theme }) => ({
|
||||
[`&.${stepConnectorClasses.alternativeLabel}`]: {
|
||||
@ -168,6 +169,8 @@ export const Registration = () => {
|
||||
horizontal: 'center',
|
||||
});
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const showNotification = (
|
||||
message: React.ReactNode,
|
||||
severity: 'success' | 'info' | 'warning' | 'error' = 'info',
|
||||
@ -290,7 +293,7 @@ export const Registration = () => {
|
||||
const handleVerifyCode = async () => {
|
||||
const response = await getVerificationStatus(username);
|
||||
if (response.is_verified) {
|
||||
window.location.href = '/login';
|
||||
navigate('/login', { replace: true });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user