fix preview not updating
Made-with: Cursor
This commit is contained in:
parent
3ade515398
commit
3149feb22f
|
|
@ -50,6 +50,9 @@ export default function App() {
|
||||||
if (!template) return
|
if (!template) return
|
||||||
|
|
||||||
let cancelled = false
|
let cancelled = false
|
||||||
|
// Clear previous output immediately so the iframe can't appear "stuck".
|
||||||
|
setHtml('')
|
||||||
|
setText('')
|
||||||
const handle = setTimeout(async () => {
|
const handle = setTimeout(async () => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
setError(null)
|
setError(null)
|
||||||
|
|
@ -73,7 +76,7 @@ export default function App() {
|
||||||
cancelled = true
|
cancelled = true
|
||||||
clearTimeout(handle)
|
clearTimeout(handle)
|
||||||
}
|
}
|
||||||
}, [brand, templateId, data])
|
}, [brand, template, data])
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
page: {
|
page: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user