mirror of
https://github.com/penpot/penpot.git
synced 2026-05-13 12:04:06 +00:00
18 lines
385 B
Clojure
18 lines
385 B
Clojure
(ns app.main.data.render-wasm
|
|
(:require
|
|
[potok.v2.core :as ptk]))
|
|
|
|
(defn context-lost
|
|
[]
|
|
(ptk/reify ::context-lost
|
|
ptk/UpdateEvent
|
|
(update [_ state]
|
|
(update state :render-state #(assoc % :lost true)))))
|
|
|
|
(defn context-restored
|
|
[]
|
|
(ptk/reify ::context-restored
|
|
ptk/UpdateEvent
|
|
(update [_ state]
|
|
(update state :render-state #(dissoc % :lost)))))
|