diff --git a/stores/notifications/notifications-store.ts b/stores/notifications/notifications-store.ts index 1adfe3b4d2..48455e0f17 100644 --- a/stores/notifications/notifications-store.ts +++ b/stores/notifications/notifications-store.ts @@ -1,24 +1,6 @@ import { create } from 'zustand' import { devtools } from 'zustand/middleware' - -export type NotificationType = 'error' | 'console' - -export interface Notification { - id: string - type: NotificationType - message: string - timestamp: number - isVisible: boolean -} - -interface NotificationStore { - notifications: Notification[] - addNotification: (type: NotificationType, message: string) => void - hideNotification: (id: string) => void - showNotification: (id: string) => void - removeNotification: (id: string) => void - clearNotifications: () => void -} +import { NotificationType, Notification, NotificationStore } from './types' export const useNotificationStore = create()( devtools( diff --git a/stores/notifications/types.ts b/stores/notifications/types.ts new file mode 100644 index 0000000000..dfa434a25b --- /dev/null +++ b/stores/notifications/types.ts @@ -0,0 +1,18 @@ +export type NotificationType = 'error' | 'console' + +export interface Notification { + id: string + type: NotificationType + message: string + timestamp: number + isVisible: boolean +} + +export interface NotificationStore { + notifications: Notification[] + addNotification: (type: NotificationType, message: string) => void + hideNotification: (id: string) => void + showNotification: (id: string) => void + removeNotification: (id: string) => void + clearNotifications: () => void +} \ No newline at end of file