From 9b9965f297d1eb30490c42b2de9859135fae1648 Mon Sep 17 00:00:00 2001
From: Erik Borgeteien Hansen <erik@erikbhan.no>
Date: Thu, 5 May 2022 11:24:41 +0200
Subject: [PATCH] change long text to short text

---
 src/components/UserProfileComponents/UserListItemCard.vue | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/components/UserProfileComponents/UserListItemCard.vue b/src/components/UserProfileComponents/UserListItemCard.vue
index 1d6bd9f..de15de2 100644
--- a/src/components/UserProfileComponents/UserListItemCard.vue
+++ b/src/components/UserProfileComponents/UserListItemCard.vue
@@ -18,7 +18,7 @@
 
     <!-- User rating -->
     <div class="hidden md:block flex-auto">
-      <RatingComponent :rating="rating" :ratingType="'Gjennomsnitts rating'" />
+      <RatingComponent :rating="rating" :ratingType="'Vurderinger'" />
     </div>
 
     <!-- Buttons -->
@@ -132,7 +132,11 @@ export default {
     },
   },
   async created() {
-    this.rating = await UserService.getUserRatingAverage(this.user.userId);
+    const maybeRating = await UserService.getUserRatingAverage(
+      this.user.userId
+    );
+    if (isNaN(maybeRating)) this.rating = NaN;
+    else this.rating = maybeRating;
     this.communityID = this.$route.params.communityID;
   },
 };
-- 
GitLab