aboutsummaryrefslogtreecommitdiff
path: root/test/playground/main.gleam
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-04-05 13:35:32 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-04-05 13:35:32 +0100
commiteb015d386971bd25c58a0f07a0996e0c735e5913 (patch)
treee385cea1ef732d4a38e00ee3db7faaf66622eaf7 /test/playground/main.gleam
parent1b5b5d772a603ff710af8492e3fe6c404a641126 (diff)
downloadlustre-eb015d386971bd25c58a0f07a0996e0c735e5913.tar.gz
lustre-eb015d386971bd25c58a0f07a0996e0c735e5913.zip
:recycle: Remove unused imports.
Diffstat (limited to 'test/playground/main.gleam')
-rw-r--r--test/playground/main.gleam36
1 files changed, 16 insertions, 20 deletions
diff --git a/test/playground/main.gleam b/test/playground/main.gleam
index 6b7f7f7..0b0bbe1 100644
--- a/test/playground/main.gleam
+++ b/test/playground/main.gleam
@@ -1,32 +1,28 @@
import gleam/io
import lustre
-import lustre/attribute.{ Attribute, attribute }
-import lustre/element.{ Element }
+import lustre/attribute.{attribute}
import playground/monaco
pub type Action {
- OnInput(String)
+ OnInput(String)
}
-pub fn main () {
- let init = "// Write some Gleam code here"
+pub fn main() {
+ let init = "// Write some Gleam code here"
- let update = fn (_, action) {
- case action {
- OnInput(input) ->
- io.debug(input)
- }
+ let update = fn(_, action) {
+ case action {
+ OnInput(input) -> io.debug(input)
}
+ }
- let render = fn (state) {
- monaco.render([
- attribute("value", state),
- monaco.on_change(fn (code, dispatch) {
- dispatch(OnInput(code))
- })
- ])
- }
+ let render = fn(state) {
+ monaco.render([
+ attribute("value", state),
+ monaco.on_change(fn(code, dispatch) { dispatch(OnInput(code)) }),
+ ])
+ }
- lustre.simple(init, update, render)
- |> lustre.start("[data-lustre-container]")
+ lustre.simple(init, update, render)
+ |> lustre.start("[data-lustre-container]")
}