- Contact Us
+ Contact Us
From 1ed99048b62f2ff84ef0ad468c2d683c2321cf57 Mon Sep 17 00:00:00 2001
From: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com>
Date: Sun, 2 Oct 2022 22:32:47 +0530
Subject: [PATCH 2/4] add fix
---
components/sdgCard.vue | 4 ++--
pages/contact/index.vue | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/components/sdgCard.vue b/components/sdgCard.vue
index 2d231bb..40e7135 100644
--- a/components/sdgCard.vue
+++ b/components/sdgCard.vue
@@ -15,7 +15,7 @@
loading="lazy"
width="200"
height="200" />
-
+
{{ name }}
@@ -125,7 +125,7 @@ export default defineComponent({ avatarURL.value = props.imageUrl; } else { - var parts = props.name.split(" ") + const parts = props.name.split(" ") avatarURL.value = `https://ui-avatars.com/api/?name=${parts[0]}+${parts[1]}&&size=200&&rounded=true` } }) diff --git a/pages/contact/index.vue b/pages/contact/index.vue index 7ba519d..4b587ed 100644 --- a/pages/contact/index.vue +++ b/pages/contact/index.vue @@ -2,7 +2,7 @@
- Contact Us
+ Contact Us
Date: Mon, 3 Oct 2022 12:35:01 +0530
Subject: [PATCH 3/4] Change initial value of avatarURL
---
components/sdgCard.vue | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/components/sdgCard.vue b/components/sdgCard.vue
index 40e7135..2826649 100644
--- a/components/sdgCard.vue
+++ b/components/sdgCard.vue
@@ -117,14 +117,11 @@ export default defineComponent({
}
},
setup(props){
- const avatarURL = ref("")
+ const avatarURL = ref(props.imageUrl)
fetch(props.githubLink, {method: "HEAD"})
.then((res) => {
- if (res.status === 200) {
- avatarURL.value = props.imageUrl;
- }
- else {
+ if (res.status != 200) {
const parts = props.name.split(" ")
avatarURL.value = `https://ui-avatars.com/api/?name=${parts[0]}+${parts[1]}&&size=200&&rounded=true`
}
From 7341403b899589ae17ab8f96d00e491854fb7a93 Mon Sep 17 00:00:00 2001
From: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com>
Date: Mon, 3 Oct 2022 12:36:28 +0530
Subject: [PATCH 4/4] Change initial value of avatarURL
---
components/sdgCard.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/sdgCard.vue b/components/sdgCard.vue
index 2826649..36d70f7 100644
--- a/components/sdgCard.vue
+++ b/components/sdgCard.vue
@@ -121,7 +121,7 @@ export default defineComponent({
fetch(props.githubLink, {method: "HEAD"})
.then((res) => {
- if (res.status != 200) {
+ if (res.status !== 200) {
const parts = props.name.split(" ")
avatarURL.value = `https://ui-avatars.com/api/?name=${parts[0]}+${parts[1]}&&size=200&&rounded=true`
}