circle-ihk
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -50,3 +50,10 @@ import useApp from './useApp'; | ||
} | ||
return app.on(fieldToListen, refetch); | ||
const hooks = []; | ||
hooks.push(app.on(fieldToListen, refetch)); | ||
hooks.push(app.on('color_scheme', refetch)); | ||
return () => { | ||
hooks.forEach((hook) => { | ||
hook(); | ||
}); | ||
}; | ||
}, [id]); | ||
@@ -53,0 +60,0 @@ return { |
@@ -15,3 +15,5 @@ import { useState, useEffect } from 'react'; | ||
app.on('tab_activated', () => { | ||
setUser({ ...app.user }); | ||
app.syncUser().then(() => { | ||
setUser({ ...app.user }); | ||
}); | ||
}); | ||
@@ -18,0 +20,0 @@ }, []); |
@@ -112,3 +112,3 @@ export interface User { | ||
data(id: string, value?: any): any; | ||
get: (id: string, table?: string) => Promise<any>; | ||
get: (id?: string, table?: string) => Promise<any>; | ||
set: (id: string | Array<IData>, value?: any, table?: string) => Promise<any>; | ||
@@ -115,0 +115,0 @@ remove: (id: string | Array<string>, table?: string) => Promise<any>; |
@@ -11,3 +11,3 @@ import templateContext from './template-context'; | ||
: 'Export template not found'; | ||
const data = templateValue.replace(/\[([^[|^\]]+)\]/g, (match, key) => { | ||
const data = templateValue.replace(/\[([^[|^\]]+)\]/g, (_match, key) => { | ||
const [scope, attr, start, end] = key.trim().split(':'); | ||
@@ -40,5 +40,5 @@ if (scope && attr) { | ||
} | ||
return match; | ||
return ''; | ||
} | ||
return match; | ||
return ''; | ||
}); | ||
@@ -45,0 +45,0 @@ returnValue.push(app.applyFilter(template, data, args.id)); |
{ | ||
"name": "circle-ihk", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Circle Reader Component Library", |
48141
1403