Ignore:
Timestamp:
01/27/26 15:56:00 (6 months ago)
Author:
Dimitar Arsov <dimitararsov04@…>
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.
Message:

Merge branch 'main' into follow-user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/pages/Login.tsx

    r77e572b rc1d2f07  
    11import { useState } from "react";
    22import { useNavigate } from "react-router-dom";
     3import { toast } from "react-toastify";
    34import axiosInstance, { scheduleTokenRefresh } from "../api/axiosInstance";
    45import { useAuth } from "../context/authContext";
     
    2223                        setUser(response.data.user);
    2324                        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}`);
    2631                }
    2732        };
Note: See TracChangeset for help on using the changeset viewer.