diff --git a/client/src/components/layout/DashboardLayout.tsx b/client/src/components/layout/DashboardLayout.tsx index 7b597a6..d7c3b4f 100644 --- a/client/src/components/layout/DashboardLayout.tsx +++ b/client/src/components/layout/DashboardLayout.tsx @@ -43,8 +43,8 @@ export function DashboardLayout({ children, title = "Dashboard" }: DashboardLayo
You don't have permission to access this area. Please contact an administrator if you believe this is an error.
- - Return to Home + + Return to Home @@ -116,17 +116,17 @@ export function DashboardLayout({ children, title = "Dashboard" }: DashboardLayo {navItems.map((item) => { const isActive = location === item.href; return ( - - - {item.icon} - {item.label} - + + {item.icon} + {item.label} ); })} diff --git a/client/src/components/ui/toast.tsx b/client/src/components/ui/toast.tsx index d264dd4..8d20652 100644 --- a/client/src/components/ui/toast.tsx +++ b/client/src/components/ui/toast.tsx @@ -29,7 +29,7 @@ export function Toast({ return () => clearTimeout(timer); }, [id, onDismiss]); - const baseClasses = "fixed bottom-4 right-4 rounded-md shadow-lg p-4 transition-all duration-300 max-w-sm"; + const baseClasses = "rounded-md shadow-lg p-4 transition-all duration-300 max-w-sm"; const variantClasses = variant === "destructive" ? "bg-red-500 text-white" : "bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100"; diff --git a/client/src/hooks/use-toast.ts b/client/src/hooks/use-toast.ts index 8eff2c1..cbfd618 100644 --- a/client/src/hooks/use-toast.ts +++ b/client/src/hooks/use-toast.ts @@ -3,7 +3,7 @@ import { useState } from "react"; type ToastVariant = "default" | "destructive"; -interface ToastOptions { +export interface ToastOptions { title?: string; description?: string; variant?: ToastVariant; @@ -12,10 +12,17 @@ interface ToastOptions { className?: string; } +// Export stand-alone toast function for convenience +let addToast: (options: ToastOptions) => number = () => 0; + +export function toast(options: ToastOptions) { + return addToast(options); +} + export function useToast() { const [toasts, setToasts] = useState