daili-usage-keeper / web /src /stores /useNotificationStore.ts
pjpjq's picture
fix: build usage keeper from source
b034029 verified
import { create } from 'zustand';
type NotificationLevel = 'success' | 'error' | 'info' | 'warning';
interface NotificationState {
showNotification: (message: string, level?: NotificationLevel) => void;
}
export const useNotificationStore = create<NotificationState>(() => ({
showNotification: (message) => {
if (typeof window !== 'undefined' && message) {
window.console.info(message);
}
}
}));