fix: Replace async/await with promise chains in ParenScript
ParenScript doesn't support async/await syntax properly. Changed to use promise chains with .then() which compiles correctly. Result: - No JavaScript errors - Auth UI working correctly - Generated JS: 1386 characters - First successful ParenScript replacement complete\! Next: Can convert more JS files (profile.js, users.js, etc.)
This commit is contained in:
parent
82cfa9b293
commit
b3186d60f3
|
|
@ -53,12 +53,14 @@
|
|||
(ps:chain document
|
||||
(add-event-listener
|
||||
"DOMContentLoaded"
|
||||
(async lambda ()
|
||||
(lambda ()
|
||||
(ps:chain console (log "Auth UI initializing..."))
|
||||
(let ((auth-status (await (check-auth-status))))
|
||||
(ps:chain (check-auth-status)
|
||||
(then (lambda (auth-status)
|
||||
(ps:chain console (log "Auth status:" auth-status))
|
||||
(update-auth-ui auth-status)
|
||||
(ps:chain console (log "Auth UI updated")))))))))
|
||||
"Compiled JavaScript for auth UI - generated at load time"))
|
||||
|
||||
(defun generate-auth-ui-js ()
|
||||
"Return the pre-compiled JavaScript for authentication UI"
|
||||
|
|
|
|||
Loading…
Reference in New Issue