feat: remove signal

This commit is contained in:
karishmas6
2024-09-25 20:51:48 +05:30
parent 784d4f4e9b
commit 5610d3402b

View File

@@ -20,9 +20,7 @@ const UserRoute: React.FC<UserRouteProps> = ({ children }) => {
const fetchUser = async () => {
try {
const { data } = await axios.get('http://localhost:8080/auth/current-user', {
signal: controller.signal
});
const { data } = await axios.get('http://localhost:8080/auth/current-user');
if (data.ok) {
setOk(true);
} else {
@@ -37,7 +35,6 @@ const UserRoute: React.FC<UserRouteProps> = ({ children }) => {
}
} finally {
setLoading(false);
clearTimeout(timeoutId);
}
};
@@ -45,7 +42,6 @@ const UserRoute: React.FC<UserRouteProps> = ({ children }) => {
return () => {
controller.abort();
clearTimeout(timeoutId);
};
}, []);