From 865a72f9cfd2e49c72e140d0d408cdd1bad56516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20H=C3=B8vik?= <andehovi@stud.ntnu.no> Date: Fri, 26 Apr 2024 08:06:13 +0200 Subject: [PATCH] Fix: fixes typescript-errors in components --- .../Configuration/ConfigurationSteps/Experience.vue | 8 ++++---- src/components/Exceptions/ErrorBox.vue | 2 +- .../LeaderboardComponents/__tests__/Leaderboard.spec.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Configuration/ConfigurationSteps/Experience.vue b/src/components/Configuration/ConfigurationSteps/Experience.vue index ae4e5b2..c750f58 100644 --- a/src/components/Configuration/ConfigurationSteps/Experience.vue +++ b/src/components/Configuration/ConfigurationSteps/Experience.vue @@ -12,10 +12,10 @@ emit('changeRouterEvent', '/experience') // Declaration of reactive variables for the form and radio buttons const formRef = ref() -const beginnerRef = ref('') -const someExperienceRef = ref('') -const expertRef = ref('') -let errorMsg = ref(''); +const beginnerRef = ref() +const someExperienceRef = ref() +const expertRef = ref() +let errorMsg = ref(); /** * Validates the experience form radio buttons and updates the commitment choice in the store. diff --git a/src/components/Exceptions/ErrorBox.vue b/src/components/Exceptions/ErrorBox.vue index d73c8b5..5dc012e 100644 --- a/src/components/Exceptions/ErrorBox.vue +++ b/src/components/Exceptions/ErrorBox.vue @@ -44,7 +44,7 @@ export default defineComponent({ left: 50%; transform: translate(-50%, 0); width: min(100%, 700px); - background-color: var(--red-color); + background-color: red ; /*var(--red-color);*/ padding: 7px; border-radius: 5px; z-index: 1000; diff --git a/src/components/LeaderboardComponents/__tests__/Leaderboard.spec.ts b/src/components/LeaderboardComponents/__tests__/Leaderboard.spec.ts index 1f069a0..32852c0 100644 --- a/src/components/LeaderboardComponents/__tests__/Leaderboard.spec.ts +++ b/src/components/LeaderboardComponents/__tests__/Leaderboard.spec.ts @@ -7,7 +7,9 @@ import { useUserInfoStore } from '@/stores/UserStore'; import router from '@/router/index'; describe('Leaderboard', () => { - let wrapper, store, mockRouter; + let wrapper : any + let store : any + let mockRouter : any const leaderboard = [ { user: { id: 1, firstName: 'Alice', email: 'alice@example.com' }, rank: 1, score: 50 }, -- GitLab