mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 00:44:14 +00:00
12 lines
296 B
TypeScript
12 lines
296 B
TypeScript
import { dispatch, subscribe } from './event';
|
|
import { CLOSE_MODALS } from '@/constants/events';
|
|
|
|
export function closeModals() {
|
|
dispatch(CLOSE_MODALS);
|
|
}
|
|
|
|
export function onCloseModals(listener: () => void) {
|
|
const unsubscribe = subscribe(CLOSE_MODALS, listener);
|
|
|
|
return unsubscribe;
|
|
}
|