Skip to content

Commit

Permalink
Issue feat:Add push route after edit password to course-planner for S…
Browse files Browse the repository at this point in the history
…CTA and CCTA
  • Loading branch information
AkshataKatwal16 committed Nov 27, 2024
1 parent 6fe0397 commit ce95102
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/edit-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { showToastMessage } from '@/components/Toastify';
import { telemetryFactory } from '@/utils/telemetry';
import PasswordCreate from '@/components/PasswordCreate';
import CentralizedModal from '@/components/CentralizedModal';
import { Role } from '@/utils/app.constant';

const EditForgotPassword = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -41,6 +42,14 @@ const EditForgotPassword = () => {
}
};
const handlePrimaryButton = () => {
const storedUserData = JSON.parse(
localStorage.getItem("adminInfo") || "{}"
);
if(storedUserData?.role === Role.SCTA || storedUserData?.role === Role.CCTA)
{
router.push(`/course-planner`);

}else
router.push(`/centers`);
localStorage.setItem('skipResetPassword', 'true');
};
Expand Down

0 comments on commit ce95102

Please sign in to comment.