Skip to content

Commit 59ff0be

Browse files
authored
Merge pull request #37 from Gautam-04/Login
Added few statements
2 parents 1294811 + a529672 commit 59ff0be

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

client/src/App.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-pascal-case */
12
import ReactGA from "react-ga4";
23
import Footer from "./components/footer/Footer";
34
import Header from "./components/header/Header";

client/src/pages/Main Form/Old Tax/PersonalInfo.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react-hooks/exhaustive-deps */
12
// PersonalInfo.js
23
import "../Accordion.css";
34
import React, { useState,useEffect } from "react";
@@ -14,7 +15,6 @@ import Accordion from "react-bootstrap/Accordion";
1415
import AccordionBody from "react-bootstrap/esm/AccordionBody";
1516
import { FaRegCircleUser, FaRegAddressCard } from "react-icons/fa6";
1617
import axios from "axios";
17-
import { toast } from "react-toastify";
1818

1919
const PersonalInfo = ({ formData, onChange, handleLimitFunction }) => {
2020
const {
@@ -87,8 +87,6 @@ const PersonalInfo = ({ formData, onChange, handleLimitFunction }) => {
8787
}
8888
} catch (error) {
8989
console.error("Error fetching data:", error);
90-
toast.error("No previous records");
91-
// Handle error as needed
9290
}
9391
};
9492

client/src/pages/Profile/Profile.jsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import States from "../../utils/States.json";
99
import { FaRegCircleUser } from "react-icons/fa6";
1010
import axios from 'axios';
1111
import { toast } from "react-toastify";
12-
// import { useNavigate } from 'react-router-dom';
12+
import { useNavigate } from 'react-router-dom';
1313

1414
function Profile() {
1515
const [FirstName, setFirstName] = useState("");
@@ -32,7 +32,7 @@ function Profile() {
3232
const userData = JSON.parse(userDataString);
3333
const email = userData.email;
3434

35-
// const navigate = useNavigate();
35+
const navigate = useNavigate();
3636

3737
const handleGenderChange = (e) => {
3838
setGender(e.target.value);
@@ -76,7 +76,6 @@ function Profile() {
7676
}
7777
} catch (error) {
7878
console.error("Error fetching data:", error);
79-
toast.error("No previous records");
8079
// Handle error as needed
8180
}
8281
};
@@ -126,7 +125,11 @@ const Token = localStorage.getItem("token");
126125
console.error(err);
127126
toast.error("Try again after sometime");
128127
})
129-
.finally(() => {});
128+
.finally(() => {
129+
setTimeout(() => {
130+
navigate("/old")
131+
}, 1500);
132+
});
130133
}
131134

132135
return (

0 commit comments

Comments
 (0)