Skip to content

Commit a4681e6

Browse files
committed
bug fixes
1 parent c2707ee commit a4681e6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/Calendar.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<calendar-icon size="1rem" color="white" class="mr-2xsmall" style="transform: translateY(-2px)" />
7272
{{ getDateString(new Date(event.date), new Date(event.dateEnd)) }}
7373
</div>
74-
<div v-if="event.location.trim() !== ''" class="flex">
74+
<div v-if="event.location && event.location.trim() !== ''" class="flex">
7575
<marker-icon class="mr-2xsmall" size="1rem" style="transform: translateY(3px)" />
7676
{{ event.location }}
7777
</div>
@@ -152,6 +152,9 @@ export default {
152152
}
153153
},
154154
async mounted() {
155+
this.$refs.container.addEventListener('click', () => {
156+
window.plausible('Interact', { props: { section: 'Calendar' } })
157+
}, { passive: true })
155158
this.events = (await getEvents()).sort((a, b) => {
156159
if (new Date(a.date) < new Date(b.date)) return -1
157160
return 1
@@ -180,7 +183,7 @@ export default {
180183
})
181184
},
182185
expand(target) {
183-
if (!this.expanded) {
186+
if (!this.expanded && target) {
184187
setTimeout(() => {
185188
const bottomVisible = (window.innerHeight - target.getBoundingClientRect().bottom) > 30
186189
if (!bottomVisible) this.$refs.container.scrollIntoView({ behavior: 'smooth', block: 'end' })

src/components/News.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export default {
6464
}
6565
},
6666
async mounted() {
67+
this.$refs.container.addEventListener('click', () => {
68+
window.plausible('Interact', { props: { section: 'News' } })
69+
}, { passive: true })
6770
this.news = (await getNews()).sort((a, b) => {
6871
if (new Date(a.date) > new Date(b.date)) return -1
6972
return 1

0 commit comments

Comments
 (0)