fix: revert load effect to working form; move Plugin-loaded log to a separate safe effect so it cannot block setLoaded (was causing stuck 'Loading…')
This commit is contained in:
1 parent
427155f93f
commit
9065ddccbd
1 file changed
+1
-1
+1
-1
@@ -259,12 +259,12 @@ function Plugin () {
|
||||
setTimeout(function () { setCopied(false) }, 1500)
|
||||
}
|
||||
useEffect(function () {
|
||||
logEvent('Plugin loaded · figma.version=' + (figma as any).version)
|
||||
loadSettings()
|
||||
.then(function (s) { setSettings(s) })
|
||||
.catch(function () {})
|
||||
.finally(function () { setLoaded(true) })
|
||||
}, [])
|
||||
useEffect(function () { try { logEvent('Plugin loaded') } catch (e) {} }, [])
|
||||
const resizeRef = useRef({ active: false, dir: '', startX: 0, startY: 0, startW: 0, startH: 0, fixedAxis: 'none' as 'none' | 'x' | 'y' })
|
||||
// Current dock position (for "window is edge-docked" detection in UI). Center and
|
||||
// corners are NOT written here — they are not considered docked (window just lies there).
|
||||
|
||||
Reference in new issue
Block a user