Skip to content

Commit

Permalink
toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
TodePond committed Dec 11, 2023
1 parent 8f8df9a commit cff7d2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wikiblogarden/tadi-web/cloud/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ A simple "save password to local storage" toggle would let the user choose.
<mark>}</mark>
};

const handleToggle = () => {
<mark> localStorage.setItem("save", checkbox.checked);
<mark> const handleToggle = () => {
localStorage.setItem("save", checkbox.checked);
if (checkbox.checked) {</mark>
localStorage.setItem("password", input.value);
<mark> } else {
} else {
localStorage.removeItem("password");
}</mark>
};
Expand Down

0 comments on commit cff7d2c

Please sign in to comment.