From 708c7370d9c4fa3ef7d4445755a726153b3270a5 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 13 Jun 2021 04:13:19 -0400 Subject: [PATCH] Add session data manager hook --- .../events/nitro/session/session-data-manager-event.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/hooks/events/nitro/session/session-data-manager-event.tsx diff --git a/src/hooks/events/nitro/session/session-data-manager-event.tsx b/src/hooks/events/nitro/session/session-data-manager-event.tsx new file mode 100644 index 00000000..5b4b550d --- /dev/null +++ b/src/hooks/events/nitro/session/session-data-manager-event.tsx @@ -0,0 +1,8 @@ +import { NitroEvent } from 'nitro-renderer'; +import { GetSessionDataManager } from '../../../../api'; +import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; + +export function useSessionDataManagerEvent(type: string, handler: (event: NitroEvent) => void): void +{ + CreateEventDispatcherHook(type, GetSessionDataManager().events, handler); +}