diff --git a/package.json b/package.json
index 9558f65c..6fdb804f 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,8 @@
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"react-scroll-sync": "^0.9.0",
+ "react-toastify": "^8.0.3",
+ "toast": "^0.3.47",
"web-vitals": "^1.1.2"
},
"scripts": {
diff --git a/src/Loginsignup/Home.js b/src/Loginsignup/Home.js
index facd7802..1d31d94f 100644
--- a/src/Loginsignup/Home.js
+++ b/src/Loginsignup/Home.js
@@ -1,6 +1,9 @@
import React, { useState , useContext, useEffect } from 'react';
import axios from "axios";
import "./Home.css";
+import { ToastContainer } from 'react-toastify';
+import { Toast } from 'react-toastify/dist/components';
+
function updateLocalStorage(tokens) {
localStorage.setItem('accessToken', tokens.accessToken)
@@ -90,6 +93,16 @@ const LogSign = () => {
}
}
+ const forgetPassword = async() => {
+ const body = {email: userNameSignin}
+ await axios.post(`http://localhost:8000/user/forgotpassword/`, body)
+ .then((res) => {
+ if(res.status == 200){
+ Toast("Please check your email for instructions");
+ }
+ })
+ }
+
// console.log(`${'a' + (1^signupShow)}`);
return (
<>
@@ -115,7 +128,7 @@ const LogSign = () => {
setUserNameSignin(e.target.value)}/>
setPasswordSignin(e.target.value)}/>
- Forgot your password?
+