diff --git a/src/components/LeaderboardComponents/Leaderboard.vue b/src/components/LeaderboardComponents/Leaderboard.vue index c2e6c4f88ba9cfb29986d5bb931172c9176b514f..71b11995c1e5c8d94fedc8855802506ed90696bb 100644 --- a/src/components/LeaderboardComponents/Leaderboard.vue +++ b/src/components/LeaderboardComponents/Leaderboard.vue @@ -1,11 +1,12 @@ <template> <div id="leaderboard"> - + <table> <tbody data-cy="top-leaderboard-table"> - <tr data-cy="top-leaderboard-tablerow" v-for="(entry, index) in leaderboard" - :key="entry.user?.id" :class="{ 'is-user-5': - entry.user?.id === userStore.id }"> + <tr data-cy="top-leaderboard-tablerow" v-for="(entry, index) in leaderboard" :key="entry.user?.id" :class="{ + 'is-user-5': + entry.user?.id === userStore.id + }"> <td class="number">{{ entry.rank }}</td> <td class="name" @click="navigateToUserProfile(entry.user?.id ?? 0)">{{ entry.user?.firstName }}</td> <td class="points" v-if="index === 0"> @@ -15,16 +16,9 @@ </tr> </tbody> <tbody id="line">`</tbody> -<<<<<<< HEAD - <tbody v-if="!userInLeaderboard"> - <tr v-for="(entry, index) in leaderboardExtra" :key="entry.user?.id" :class="{ 'is-user-5': entry.user?.id === userStore.id }"> -======= <tbody data-cy="surrounding-user-leaderboard-table" v-if="!userInLeaderboard"> - <tr></tr> - <tr data-cy="surrounding-user-leaderboard-tablerow" v-for="(entry, index) in - leaderboardExtra" :key="entry.user?.id" :class="{ - 'is-user-5': entry.user?.id === userStore.id }"> ->>>>>>> e50d5c050dfc8dc2ff7931c3a05f22c024a70e31 + <tr data-cy="surrounding-user-leaderboard-tablerow" v-for="(entry, index) in leaderboardExtra" :key="entry.user?.id" + :class="{ 'is-user-5': entry.user?.id === userStore.id }"> <td class="number">{{ entry.rank }}</td> <td class="name" @click="navigateToUserProfile(entry.user?.id ?? 0)">{{ entry.user?.firstName }}</td> <td class="points">{{ entry.score }}</td> @@ -66,7 +60,6 @@ const navigateToUserProfile = (id: number) => { </script> <style scoped> - #leaderboard { max-width: 80%; position: relative; diff --git a/src/views/LeaderboardView.vue b/src/views/LeaderboardView.vue index c0324c51cdfe209e31036b36a33f56a7954cc5a4..fde5b950331544f95fb849964cbb7ff28fb42314 100644 --- a/src/views/LeaderboardView.vue +++ b/src/views/LeaderboardView.vue @@ -19,18 +19,6 @@ </div> <main> <div id="leaderboard"> -<<<<<<< HEAD - <h1><img src="@/assets/items/pigcoin.png" style="width: 2rem" alt="pig coin"> Poeng</h1> - <Leaderboard :leaderboard="pointsLeaderboardData" :leaderboardExtra="pointsLeaderboardDataExtra" @navigateToUserProfile="navigateToUserProfile" /> - </div> - <div id="leaderboard"> - <h1><img src="@/assets/icons/fire.png" style="width: 2rem" alt="ild"> Streak</h1> - <Leaderboard :leaderboard="currentLeaderboardData" :leaderboardExtra="currentLeaderboardDataExtra" @navigateToUserProfile="navigateToUserProfile" /> - </div> - <div id="leaderboard"> - <h1><img src="@/assets/icons/fire.png" style="width: 2rem" alt="ild"> Streak</h1> - <Leaderboard :leaderboard="streakLeaderboardData" :leaderboardExtra="streakLeaderboardDataExtra" @navigateToUserProfile="navigateToUserProfile" /> -======= <h1><img src="@/assets/items/pigcoin.png" style="width: 2rem" alt="pig coin"> Totale poeng</h1> <Leaderboard data-cy="total-points-board" :leaderboard="pointsLeaderboardData" :leaderboardExtra="pointsLeaderboardDataExtra" @navigateToUserProfile="navigateToUserProfile" /> @@ -44,7 +32,6 @@ <h1><img src="@/assets/icons/fire.png" style="width: 2rem" alt="ild"> Høyeste rekke</h1> <Leaderboard data-cy="streak-board" :leaderboard="streakLeaderboardData" :leaderboardExtra="streakLeaderboardDataExtra" @navigateToUserProfile="navigateToUserProfile" /> ->>>>>>> e50d5c050dfc8dc2ff7931c3a05f22c024a70e31 </div> </main> </div>