feat: implement beautiful toast notifications with Sonner
- Install sonner package for toast notifications - Add Toaster component to root layout with dark theme styling - Replace all alert() calls with toast.success() and toast.error() - Add descriptive messages for success states - Toast notifications match the app's dark theme design
This commit is contained in:
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
|
||||
import { Geist } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { Sidebar } from "@/components/sidebar";
|
||||
import { Toaster } from "sonner";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
@@ -27,6 +28,17 @@ export default function RootLayout({
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
<Toaster
|
||||
theme="dark"
|
||||
position="top-right"
|
||||
toastOptions={{
|
||||
style: {
|
||||
background: '#171717',
|
||||
border: '1px solid #262626',
|
||||
color: '#fff',
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user