From ac1b1184fb9992f93ed4922d250702272599b72e Mon Sep 17 00:00:00 2001 From: VIktorGrev <viktog2210@gmail.com> Date: Fri, 3 May 2024 22:58:38 +0200 Subject: [PATCH] feat: Adding points check --- src/components/Shop/ItemShop.vue | 6 ++++-- src/components/UserProfile/MyProfile.vue | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Shop/ItemShop.vue b/src/components/Shop/ItemShop.vue index 417bc6e..350603a 100644 --- a/src/components/Shop/ItemShop.vue +++ b/src/components/Shop/ItemShop.vue @@ -157,7 +157,7 @@ import handleUnknownError from '@/components/Exceptions/unkownErrorHandler'; let apiUrl = import.meta.env.VITE_APP_API_URL; const products = ref([] as any); -const points = ref(); +const points = ref(0 as any); /** * Retrieves the store's products and updates the products list. @@ -178,7 +178,9 @@ const getStore = async () => { const getPoints = async () => { try { const response = await UserService.getUser(); - points.value = response.point?.currentPoints; + if (response.point?.currentPoints !== null) { + points.value = response.point?.currentPoints; + } } catch (error) { handleUnknownError(error); console.log(error); diff --git a/src/components/UserProfile/MyProfile.vue b/src/components/UserProfile/MyProfile.vue index e6a4871..9ef9add 100644 --- a/src/components/UserProfile/MyProfile.vue +++ b/src/components/UserProfile/MyProfile.vue @@ -334,7 +334,7 @@ const toUpdateUserSettings = () => { height: 200px; } -@media (max-width: 940px) { +@media (max-width: 980px) { #banner { height: 320px; } -- GitLab