feat: toast system — feedback visuel global (react-hot-toast)
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 36s

- Toaster dark theme (bottom-right, 3s/4s)
- Combat: erreur cooldown/endurance en toast
- Craft: toast start + collect + erreurs
- Forge: toast succès/échec + erreurs
- Shop: toast achat + erreurs
- Inventaire: toast vente + erreurs
- Fix forge costs frontend (200/400/700)
This commit is contained in:
2026-03-24 22:15:28 +01:00
parent 0d917a8b39
commit faf2a98227
8 changed files with 63 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Toaster } from 'react-hot-toast';
import { AuthProvider, useAuth } from './context/AuthContext';
import { Layout } from './components/Layout';
import { LoginPage } from './pages/LoginPage';
@@ -54,6 +55,15 @@ export default function App() {
<AppRoutes />
</BrowserRouter>
</AuthProvider>
<Toaster
position="bottom-right"
toastOptions={{
duration: 3000,
style: { background: '#1e2535', color: '#dce4f0', border: '1px solid #2a3448', fontSize: 13 },
success: { iconTheme: { primary: '#3ddc84', secondary: '#1e2535' } },
error: { iconTheme: { primary: '#e84040', secondary: '#1e2535' }, duration: 4000 },
}}
/>
</QueryClientProvider>
);
}