convert autosave invocation to useEffect
This commit is contained in:
parent
57af6dd320
commit
54113caf0d
1 changed files with 6 additions and 5 deletions
|
@ -473,7 +473,12 @@
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|
||||||
let output = html`
|
useEffect(() => {
|
||||||
|
// autosave template on every change
|
||||||
|
userTemplateAutosave()
|
||||||
|
}, [session.value, params.value])
|
||||||
|
|
||||||
|
return html`
|
||||||
<form>
|
<form>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<${UserTemplateResetButton}/>
|
<${UserTemplateResetButton}/>
|
||||||
|
@ -539,10 +544,6 @@
|
||||||
</details>
|
</details>
|
||||||
</form>
|
</form>
|
||||||
`
|
`
|
||||||
|
|
||||||
userTemplateAutosave();
|
|
||||||
|
|
||||||
return output
|
|
||||||
}
|
}
|
||||||
// poor mans markdown replacement
|
// poor mans markdown replacement
|
||||||
const Markdownish = (params) => {
|
const Markdownish = (params) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue