diff --git a/packages/frontendmu-data/data/speakers-profile.json b/packages/frontendmu-data/data/speakers-profile.json new file mode 100644 index 00000000..bc56f3ab --- /dev/null +++ b/packages/frontendmu-data/data/speakers-profile.json @@ -0,0 +1,17 @@ +[ + { + "bio": "Front-end Developer based in Mauritius.", + "job_title": "Senior Front-end Engineer @ Livestorm", + "location": "Mauritius", + "website": "https://sandeep.ramgolam.com", + "github": "MrSunshyne", + "twitter": "@__sun__" + }, + { + "bio": "Front-End Engineer | Streamer (Twitch)", + "job_title": "Senior Front-end Engineer @ Livestorm", + "location": "Mauritius", + "github": "cedpoilly", + "twitter": "" + } +] \ No newline at end of file diff --git a/packages/frontendmu-nuxt/components/speaker/Single.vue b/packages/frontendmu-nuxt/components/speaker/Single.vue index cff5fc7d..9782e74b 100644 --- a/packages/frontendmu-nuxt/components/speaker/Single.vue +++ b/packages/frontendmu-nuxt/components/speaker/Single.vue @@ -4,34 +4,42 @@ import LogoSpiral from '@/components/misc/LogoSpiral.vue' import { getGithubUrl } from '@/utils/helpers' import ContentBlock from '@/components/misc/ContentBlock.vue' -const props = defineProps({ - speaker: { - type: Object, - required: true, - }, -}) - -const speaker_photo = getGithubUrl(props.speaker.person?.github_account) +import type { SpeakerProfileWithSessions } from '~/utils/types' + +interface SpeakerSingleProps { + speaker: SpeakerProfileWithSessions +} + +const props = defineProps() + +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 speaker_photo = getGithubUrl(person.value.github_account)