diff --git a/Auth/Profile/profile.php b/Auth/Profile/profile.php
index 17e02c7..5432ada 100644
--- a/Auth/Profile/profile.php
+++ b/Auth/Profile/profile.php
@@ -421,7 +421,8 @@ class="friend-name">
fetch_assoc()): ?>
+ data-game-id=""
+ onclick="window.location.href='/ITWS-2110-F24-WinShare/Game/game.php?game_id='">
|
|
|
diff --git a/Auth/Profile/src/profile.js b/Auth/Profile/src/profile.js
index 1c5a7f8..272eaad 100644
--- a/Auth/Profile/src/profile.js
+++ b/Auth/Profile/src/profile.js
@@ -157,16 +157,29 @@ document.addEventListener('DOMContentLoaded', function() {
const init = () => {
animateStats();
initFriendSearch();
+
+ // Update the click handler for rows
+ document.querySelectorAll('.clickable-row').forEach(row => {
+ row.addEventListener('click', function(e) {
+ const gameId = this.getAttribute('onclick').match(/game_id=([^']+)/)[1];
+ if (gameId) {
+ window.location.href = `/ITWS-2110-F24-WinShare/Game/game.php?game_id=${gameId}`;
+ }
+ });
+ });
};
init();
initPendingRequests();
+ // Remove this section as we're handling clicks differently now
+ /*
document.querySelectorAll('.clickable-row').forEach(row => {
row.addEventListener('click', function() {
window.location.href = this.dataset.href;
});
});
+ */
});
function initPendingRequests() {