File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ app.get("/", async (c: Context) => {
191191 const [ bungus ] = things . splice ( Math . floor ( rand ( ) * things . length ) , 1 ) ;
192192 stuff . push ( bungus ) ;
193193 }
194+ const localStorageIdent = Math . floor ( rand ( ) * 10000 ) ;
194195
195196 return c . html (
196197 < Layout >
@@ -199,8 +200,8 @@ app.get("/", async (c: Context) => {
199200 { stuff . map ( ( thing , i ) => (
200201 < button
201202 _ = { `
202- on click toggle .checked on me then set localStorage.clicked${ i } to me matches .checked end
203- on load if localStorage.clicked${ i } == "true" then add .checked to me end
203+ on click toggle .checked on me then set localStorage.clicked${ localStorageIdent } _ ${ i } to me matches .checked end
204+ on load if localStorage.clicked${ localStorageIdent } _ ${ i } == "true" then add .checked to me end
204205 ` }
205206 >
206207 { thing }
You can’t perform that action at this time.
0 commit comments