verbesserung von benachrichtungen und warnungen an nutzer abgeschlossen. layout editor nun auf gutem stand.
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
Package as PackageIcon,
|
||||
Loader2,
|
||||
} from 'lucide-react';
|
||||
import toast from 'react-hot-toast';
|
||||
|
||||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -205,6 +206,23 @@ export default function DashboardPage() {
|
||||
[primaryEventLimits, limitTranslate],
|
||||
);
|
||||
|
||||
const shownToastsRef = React.useRef<Set<string>>(new Set());
|
||||
|
||||
React.useEffect(() => {
|
||||
limitWarnings.forEach((warning) => {
|
||||
const toastKey = `${warning.id}-${warning.message}`;
|
||||
if (shownToastsRef.current.has(toastKey)) {
|
||||
return;
|
||||
}
|
||||
|
||||
shownToastsRef.current.add(toastKey);
|
||||
toast(warning.message, {
|
||||
icon: warning.tone === 'danger' ? '🚨' : '⚠️',
|
||||
id: toastKey,
|
||||
});
|
||||
});
|
||||
}, [limitWarnings]);
|
||||
|
||||
const limitScopeLabels = React.useMemo(
|
||||
() => ({
|
||||
photos: tc('limits.photosTitle'),
|
||||
|
||||
Reference in New Issue
Block a user