feat: add toast notifications for error handling and success messages across various components

This commit is contained in:
Your Name
2026-03-22 16:48:07 +02:00
parent 70d7f09110
commit ce610f5c6e
11 changed files with 80 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
import { lazy, Suspense, useEffect } from 'react';
import { Routes, Route, useLocation } from 'react-router-dom';
import { Toaster } from 'sonner';
import Header from '@/components/layout/Header';
import Footer from '@/components/layout/Footer';
import CookieConsent from '@/components/layout/CookieConsent';
@@ -86,6 +87,7 @@ export default function App() {
useDirection();
const location = useLocation();
const refreshUser = useAuthStore((state) => state.refreshUser);
const isRTL = document.documentElement.getAttribute('dir') === 'rtl';
useEffect(() => {
initAnalytics();
@@ -196,6 +198,16 @@ export default function App() {
<Footer />
<SiteAssistant />
<CookieConsent />
<Toaster
position={isRTL ? 'top-left' : 'top-right'}
dir={isRTL ? 'rtl' : 'ltr'}
richColors
closeButton
duration={4000}
toastOptions={{
className: 'text-sm',
}}
/>
</div>
);
}