fix(api): fix api endpoint logic #2

This commit is contained in:
shafin-r
2025-08-16 17:05:40 +06:00
parent 713696760e
commit ad46bf954e
5 changed files with 40 additions and 41 deletions

View File

@ -59,8 +59,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
useEffect(() => {
const initializeAuth = () => {
const storedToken = getCookie("authToken");
console.log("Current pathname:", pathname);
console.log("Stored token:", storedToken);
if (storedToken) {
setTokenState(storedToken);
@ -69,7 +67,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
pathname === "/login" ||
pathname === "/register"
) {
console.log("Redirecting to /home");
router.replace("/home");
}
} else {