diff --git a/client/js/admin/games.js b/client/js/admin/games.js index f793f37..d2cb316 100644 --- a/client/js/admin/games.js +++ b/client/js/admin/games.js @@ -19,6 +19,8 @@ function loadGames() { function displayGames(games) { const gamesList = $('#games-list'); + gamesList.empty(); // Clear existing games before appending new ones + games.forEach(game => { gamesList.append(`
@@ -32,6 +34,7 @@ function displayGames(games) {

Creator: ${escapeHtml(game.creator.username)}

Created: ${new Date(game.createdAt).toLocaleString()}

+

Description: ${escapeHtml(game.description || 'No description provided.')}