@goodandready/dsh-model-sync 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -135,7 +135,7 @@ window.__ModuleLoader__.load({
|
|
|
135
135
|
function ModelSyncCard({ ctx }) {
|
|
136
136
|
const locale = useLocale(ctx); const t = locale === 'ru' ? ru : en; const [open, setOpen] = React.useState(false)
|
|
137
137
|
const [cardStatus, setCardStatus] = React.useState(null)
|
|
138
|
-
React.useEffect(() => { const load = () => fetch(`${API}/status`).then(r=>r.json()).then(setCardStatus).catch(()=>{}); load(); const id=setInterval(load,15000); return ()=>clearInterval(id)}, [])
|
|
138
|
+
React.useEffect(() => { ensureStyles(); const load = () => fetch(`${API}/status`).then(r=>r.json()).then(setCardStatus).catch(()=>{}); load(); const id=setInterval(load,15000); return ()=>clearInterval(id)}, [])
|
|
139
139
|
const cardBadge = (cardStatus?.lastRun?.results?.reduce((s,r)=>s+(r.diff?.added?.length||0),0) || 0)
|
|
140
140
|
return React.createElement('li', { className: 'dms-card' + (open ? ' dms-card-open' : '') },
|
|
141
141
|
React.createElement('button', { type: 'button', className: 'dms-card-header', 'aria-expanded': open, 'aria-label': `${t[open ? 'hideSettings' : 'showSettings']}: ${t.title}`, onClick: () => setOpen((value) => !value) },
|