From a245195fe7dee6ac36ecdf3d65bd053c08e62c43 Mon Sep 17 00:00:00 2001 From: Taylor Hunt Date: Wed, 18 Jan 2023 12:02:54 -0500 Subject: [PATCH] Apply suggestions from code review Everything except for the TS declarations since I think Dylan ought to weigh in Co-authored-by: Michael Rawlings Co-authored-by: Luke LaValva --- .../2-templating/6-conditional/marko/TrafficLight.marko | 7 ++----- content/3-lifecycle/2-on-unmount/marko/Time.marko | 6 +++--- content/6-form-input/2-checkbox/marko/IsAvailable.marko | 2 +- content/6-form-input/3-radio/marko/PickPill.marko | 7 +++---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/content/2-templating/6-conditional/marko/TrafficLight.marko b/content/2-templating/6-conditional/marko/TrafficLight.marko index 570ae11b..0a1c3c4e 100644 --- a/content/2-templating/6-conditional/marko/TrafficLight.marko +++ b/content/2-templating/6-conditional/marko/TrafficLight.marko @@ -1,12 +1,9 @@ static const TRAFFIC_LIGHTS = ["red", "orange", "green"]; - +

Light is: ${light}

diff --git a/content/3-lifecycle/2-on-unmount/marko/Time.marko b/content/3-lifecycle/2-on-unmount/marko/Time.marko index c8471dea..a17f1d23 100644 --- a/content/3-lifecycle/2-on-unmount/marko/Time.marko +++ b/content/3-lifecycle/2-on-unmount/marko/Time.marko @@ -1,6 +1,6 @@ - time = new Date()), 1000) } + time = new Date(), 1000) } onDestroy () { clearInterval(this.timer) } -}/> +/>

Current time: ${time.toLocaleTimeString()}

diff --git a/content/6-form-input/2-checkbox/marko/IsAvailable.marko b/content/6-form-input/2-checkbox/marko/IsAvailable.marko index 5257ec92..8d2d272c 100644 --- a/content/6-form-input/2-checkbox/marko/IsAvailable.marko +++ b/content/6-form-input/2-checkbox/marko/IsAvailable.marko @@ -1,5 +1,5 @@ diff --git a/content/6-form-input/3-radio/marko/PickPill.marko b/content/6-form-input/3-radio/marko/PickPill.marko index b9e66f47..bebf8b88 100644 --- a/content/6-form-input/3-radio/marko/PickPill.marko +++ b/content/6-form-input/3-radio/marko/PickPill.marko @@ -1,8 +1,7 @@ -function handleChange (event) { - picked = event.target.value; -} - +
Picked: ${picked}