Refactor useToast hook into modules

The useToast hook was refactored into smaller, more manageable modules.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-16 09:48:44 +00:00
parent 61acb461e0
commit 3f22e6c484
4 changed files with 12 additions and 6 deletions

View File

@@ -2,7 +2,11 @@
import { Action, actionTypes } from './types'
import { TOAST_LIMIT } from './constants'
import { reducer } from './reducer'
import { listeners, memoryState, lastAction } from './store'
import { listeners } from './store'
// 전역 상태 관리
let memoryState = { toasts: [] };
let lastAction = null;
// ID 생성기
let count = 0
@@ -49,3 +53,5 @@ export function dispatch(action: Action) {
listener(memoryState)
})
}
export { memoryState };