Skip to content

Commit

Permalink
fix: empty SDG badge
Browse files Browse the repository at this point in the history
  • Loading branch information
keenthekeen committed Sep 21, 2024
1 parent 7fa68d6 commit 573ed0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/js/Components/SDGBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
const props = defineProps<{ value: number[] | null }>();
</script>
<template>
<div class="inline-block p-0.5 text-xs bg-sky-100 rounded-sm text-sky-600" v-if="value">
<div v-if="value && value.length > 0"
class="inline-block p-0.5 text-xs bg-sky-100 rounded-sm text-sky-600">
SDGs:
<span v-for="i in value" :key="i" :class="'sdg-goal-' + i" class="ml-0.5 px-1 text-white text-center inline-block min-w-4">
{{ i }}
Expand Down

0 comments on commit 573ed0b

Please sign in to comment.