From e006bab08b7b89bd81e0d6b0d1f094566d4d4b25 Mon Sep 17 00:00:00 2001 From: sandygudie Date: Wed, 21 Aug 2024 11:02:17 +0100 Subject: [PATCH] Chore:updated link sharing --- client/src/components/Header.vue | 4 ++-- client/src/views/PublicView.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/components/Header.vue b/client/src/components/Header.vue index 184fb43..5e61006 100644 --- a/client/src/components/Header.vue +++ b/client/src/components/Header.vue @@ -27,7 +27,7 @@ defineProps<{ @click="toggleActive('links')" > - + diff --git a/client/src/views/PublicView.vue b/client/src/views/PublicView.vue index 3c022c4..5885d30 100644 --- a/client/src/views/PublicView.vue +++ b/client/src/views/PublicView.vue @@ -23,11 +23,12 @@ onMounted(async () => { isLoading.value = true try { const profileResponse = await getPublicDetails(id) + if (profileResponse.success) { profileLinks.value.firstname = profileResponse.data[0].name.split(' ')[0] profileLinks.value.lastname = profileResponse.data[0].name.split(' ')[1] profileLinks.value.email = profileResponse.data[0].email - profileLinks.value.devlinks = JSON.parse(profileResponse.data[0].links) || [] + profileLinks.value.devlinks = profileResponse.data[0].links || [] profileLinks.value.profilepic = profileResponse.data[0].profilepic } } catch (err: any) {