diff --git a/backend/server.js b/backend/server.js index a306106..214b1df 100644 --- a/backend/server.js +++ b/backend/server.js @@ -40,6 +40,7 @@ db.run(`CREATE TABLE IF NOT EXISTS games ( // Registration route app.post('/register', async (req, res) => { const { username, email, password } = req.body; + console.log("Trying to Register: ", username); try { const hashedPassword = await bcrypt.hash(password, 10); const stmt = db.prepare('INSERT INTO users (username, email, password) VALUES (?, ?, ?)'); @@ -58,6 +59,7 @@ app.post('/register', async (req, res) => { // Login route app.post('/login', (req, res) => { const { username, password } = req.body; + console.log("Trying to Login: ", username); db.get('SELECT * FROM users WHERE username = ?', [username], async (err, row) => { if (err) { return res.status(500).json({ error: 'Internal server error' }); diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index e10b933..4ed04c6 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -12,7 +12,7 @@ function App() { const showPopup = (message) => { setPopupMessage(message); - setTimeout(() => setPopupMessage(''), 3000); // Popup disappears after 3 seconds + setTimeout(() => setPopupMessage(''), 3000); }; return ( diff --git a/frontend/src/components/header.jsx b/frontend/src/components/header.jsx index 69d06d1..d57c173 100644 --- a/frontend/src/components/header.jsx +++ b/frontend/src/components/header.jsx @@ -9,12 +9,13 @@ const Header = ({ isLoggedIn }) => {