feat: add success toasts for create operations and login
- Add toast.success when workout is created or updated - Add toast.success when user logs in successfully - Show descriptive messages with entity names - Improves user feedback for successful operations
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { toast } from "sonner";
|
||||
import { supabase } from "@/lib/supabase";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
@@ -43,6 +44,10 @@ export default function LoginPage() {
|
||||
throw new Error("Not authorized as admin");
|
||||
}
|
||||
|
||||
toast.success("Welcome back!", {
|
||||
description: "You have successfully signed in."
|
||||
})
|
||||
|
||||
// Force a full page reload to ensure middleware picks up the session
|
||||
window.location.href = "/";
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user