small fix, don't worry about it

This commit is contained in:
Tomas Dvorak committed 2026-04-10 12:02:36 +02:00
1 parent 08bd0c6e5c
commit 08cb5754f3
638 files changed
+57330 -34704

No files matched your search

@@ -0,0 +1,17 @@
import { createContext, useContext } from 'react';
export type ToastType = 'success' | 'info' | 'warning' | 'error';
export interface ToastContextValue {
showToast: (message: string, type?: ToastType) => void;
}
export const ToastContext = createContext<ToastContextValue | null>(null);
export function useToast() {
const context = useContext(ToastContext);
if (!context) {
throw new Error('useToast must be used within a ToastProvider');
}
return context;
}