diff --git a/backend/README.md b/backend/README.md index 8e31e11..98d7628 100644 --- a/backend/README.md +++ b/backend/README.md @@ -14,7 +14,7 @@ To run: 4. Install dependencies: `pip install -r requirements.txt` 5. Run the database: `../db/run.sh` (you must have Docker installed and running). 6. Create the database schema: `../db/create-schema.sh` - +7. run main You may want to run `python3 populate.py` to populate sample data. If you ever need to wipe the database, just delete `../db/pg_data` (and remember to set it up again after). diff --git a/front-end/views/home.mjs b/front-end/views/home.mjs index 85a5cca..acf28a1 100644 --- a/front-end/views/home.mjs +++ b/front-end/views/home.mjs @@ -19,6 +19,7 @@ import {createBloom} from "../components/bloom.mjs"; // Home view - logged in or not function homeView() { + destroy(); if (state.isLoggedIn) { diff --git a/front-end/views/profile.mjs b/front-end/views/profile.mjs index dd2b92a..eb3e3eb 100644 --- a/front-end/views/profile.mjs +++ b/front-end/views/profile.mjs @@ -38,9 +38,10 @@ function profileView(username) { "login-template", createLogin ); - document - .querySelector("[data-action='login']") - ?.addEventListener("click", handleLogin); + + document + .querySelector("[data-form='login']") + ?.addEventListener("submit", handleLogin); const profileData = state.profiles.find((p) => p.username === username); if (profileData) {