diff --git a/admin-web/app/login/page.tsx b/admin-web/app/login/page.tsx index 1d78f84..092f676 100644 --- a/admin-web/app/login/page.tsx +++ b/admin-web/app/login/page.tsx @@ -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) { diff --git a/admin-web/components/workout-form.tsx b/admin-web/components/workout-form.tsx index 417eb55..86d6b7a 100644 --- a/admin-web/components/workout-form.tsx +++ b/admin-web/components/workout-form.tsx @@ -213,6 +213,10 @@ export default function WorkoutForm({ initialData, mode = "create" }: WorkoutFor } } + toast.success(mode === "edit" ? "Workout updated" : "Workout created", { + description: `"${title}" has been ${mode === "edit" ? "updated" : "created"} successfully.` + }) + router.push(`/workouts/${result.data.id}`) } catch (err) { console.error("Failed to save workout:", err)