Skip to content

Commit

Permalink
Merge pull request #259 from christopher-adolphe/fix/speaker-profile-bio
Browse files Browse the repository at this point in the history
fix: update computed props to hide missing profile details and add job title
  • Loading branch information
MrSunshyne authored Dec 8, 2024
2 parents 589ff10 + a53a0f5 commit 4ec128d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/frontendmu-data/data/speakers-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bio": "Front-End Engineer | Streamer (Twitch)",
"job_title": "Senior Front-end Engineer @ Livestorm",
"location": "Mauritius",
"website": "",
"github": "cedpoilly",
"twitter": ""
}
Expand Down
15 changes: 10 additions & 5 deletions packages/frontendmu-nuxt/components/speaker/Single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ const person = computed(() => props.speaker.person)
const sessions = computed(() => props.speaker.sessions)
const profile = computed(() => props.speaker.profile)
const hasProfileBio = computed(() => profile.value.bio !== '')
const hasProfileLocation = computed(() => profile.value.location !== '')
const hasProfileWebsite = computed(() => profile.value.website !== '')
const hasProfileGithub = computed(() => profile.value.github !== '')
const hasProfileTwitter = computed(() => profile.value.twitter !== '')
const hasProfileBio = computed(() => profile.value.bio && profile.value.bio !== '')
const hasProfileJobTitle = computed(() => profile.value.job_title && profile.value.job_title !== '')
const hasProfileLocation = computed(() => profile.value.location && profile.value.location !== '')
const hasProfileWebsite = computed(() => profile.value.website && profile.value.website !== '')
const hasProfileGithub = computed(() => profile.value.github && profile.value.github !== '')
const hasProfileTwitter = computed(() => profile.value.twitter && profile.value.twitter !== '')
const speaker_photo = getGithubUrl(person.value.github_account)
</script>
Expand Down Expand Up @@ -94,6 +95,10 @@ const speaker_photo = getGithubUrl(person.value.github_account)
</p>

<nav class="grid gap-2 *:flex *:justify-start *:items-center *:gap-2">
<span v-if="hasProfileJobTitle">
<Icon name="lucide:code-xml" mode="svg" class="size-6" />{{ profile.job_title }}
</span>

<span v-if="hasProfileLocation">
<Icon name="lucide:map-pin" mode="svg" class="size-6" />{{ profile.location }}
</span>
Expand Down

0 comments on commit 4ec128d

Please sign in to comment.