Changeset c1d2f07 for frontend/src/pages/Login.tsx
- Timestamp:
- 01/27/26 15:56:00 (6 months ago)
- Branches:
- main
- Children:
- 6de2873
- Parents:
- 77e572b (diff), 16aed54 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
frontend/src/pages/Login.tsx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/pages/Login.tsx
r77e572b rc1d2f07 1 1 import { useState } from "react"; 2 2 import { useNavigate } from "react-router-dom"; 3 import { toast } from "react-toastify"; 3 4 import axiosInstance, { scheduleTokenRefresh } from "../api/axiosInstance"; 4 5 import { useAuth } from "../context/authContext"; … … 22 23 setUser(response.data.user); 23 24 navigate("/"); 24 } catch (error) { 25 setError("Login failed. Please check your credentials."); 25 toast.success("Login successful!"); 26 } catch (error: any) { 27 const errorMessage = 28 error.response?.data?.error || 29 "Login failed. Please check your credentials."; 30 setError(`Login failed: ${errorMessage}`); 26 31 } 27 32 };
Note:
See TracChangeset
for help on using the changeset viewer.
