feat: feature/mvp-sprint-1 Added getThingtime to window object

This commit is contained in:
Nikolaj Frey 2023-08-16 10:15:47 +10:00
parent b6a066b630
commit 7a2eae1ee7

View File

@ -400,6 +400,7 @@ export const ThingtimeProvider = (props: any): JSX.Element => {
React.useEffect(() => {
try {
window.setThingtime = setThingtime
window.getThingtime = getThingtime
window.thingtime = thingtimeReference
window.tt = thingtimeReference
} catch {
@ -563,7 +564,7 @@ export const ThingtimeProvider = (props: any): JSX.Element => {
return () => {
window.removeEventListener("keydown", keyListener)
}
}, [setThingtime, thingtimeReference, set])
}, [setThingtime, getThingtime, thingtimeReference, set])
const value = {
thingtime: thingtimeReference,