Skip to content

Commit 9e05c16

Browse files
committedApr 10, 2023
error message
1 parent 1561cd5 commit 9e05c16

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/AppRouter.js

+2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ const AppRouter = () => {
108108
<Route path='/dept/:dept/login/:status' element={<FacultyLogin />} />
109109
<Route path='/dept/:dept/login/*' element={<FacultyLogin />} />
110110
<Route path='/dept/:dept/onClickForgotPass/*' element={<AfterForgotPass />} />
111+
<Route path='/dept/:dept/confirmation/:token/:status' element={<ChangePass />} />
111112
<Route path='/dept/:dept/confirmation/:token' element={<ChangePass />} />
112113

114+
113115
{/* ResearchArea */}
114116
<Route path='/dept/:dept/ResearchArea' element={<ResearchArea />} />
115117
<Route path='/dept/:dept/ResearchLab' element={<ResearchLab />} />

‎src/pages/ChangePass.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import Error from "./Errorpage";
55
import { SERVER_URL } from '../config/server';
66
function ChangePass() {
77
let url = useLocation();
8+
const status = url.pathname.split("/")[5];
89
const { data, loading, error, reFetch } = useFetch(url.pathname);
910
const dept = url.pathname.split("/")[2];
1011
const token = url.pathname.split("/")[4];
1112

12-
1313
return (
1414
<>
1515
{!loading ? (
@@ -60,7 +60,7 @@ function ChangePass() {
6060
required=""
6161
/>
6262
</div>
63-
63+
{status && status == 'passwordMismatch' && <div>Both passwords should match</div>}
6464
<button
6565
type="submit"
6666
className="w-[80%] block text-white bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:outline-none shadow font-medium rounded-lg text-sm px-5 py-2.5 text-center mx-auto"

0 commit comments

Comments
 (0)