0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Use initial value

This commit is contained in:
Florian Schroedl 2024-06-21 15:09:46 +02:00
parent 53f01ef46c
commit 8db47b5877

View file

@ -82,10 +82,9 @@
;; Value
value (mf/use-var (or (:value token) ""))
resolved-value (mf/use-state nil)
resolved-value (mf/use-state (get-in tokens [(:id token) :resolved-value]))
set-resolve-value (mf/use-callback
(fn [token]
(js/console.log "token" (:resolved-value token))
(when (:resolved-value token)
(reset! resolved-value (:resolved-value token)))))
value-errors (mf/use-state nil)