Compare commits
1 Commits
temp-main
...
manwar/VAN
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fcf7dea07 |
@@ -4,6 +4,7 @@ import { getConfig } from '@edx/frontend-platform';
|
||||
import { fetchAuthenticatedUser, getAuthenticatedUser } from '@edx/frontend-platform/auth';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { RESET_PAGE } from '../data/constants';
|
||||
import { updatePathWithQueryParams } from '../data/utils';
|
||||
|
||||
/**
|
||||
@@ -24,6 +25,10 @@ const UnAuthOnlyRoute = ({ children }) => {
|
||||
if (isReady) {
|
||||
if (authUser && authUser.username) {
|
||||
const updatedPath = updatePathWithQueryParams(window.location.pathname);
|
||||
if (updatedPath.startsWith(RESET_PAGE)) {
|
||||
global.location.href = getConfig().LMS_BASE_URL;
|
||||
return null;
|
||||
}
|
||||
global.location.href = getConfig().LMS_BASE_URL.concat(updatedPath);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user