Skip to content

Commit

Permalink
handle click event on open room
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogge committed Jun 27, 2024
1 parent 7d72b50 commit 37da504
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions frontend/src/components/vuetify/Atoms/ListElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:class="{ 'custom-list-item': true }"
:title="item.meetingName"
:subtitle="$t('rooms.participantCount', { count: item.participantCount })"
@click="handleItemClick"
@click="handleItemClick(item.joinLink)"
>
<!--
<template v-if="item.prepend" #prepend>
Expand All @@ -28,10 +28,14 @@
</template>

<script lang="ts" setup>
import { navigate } from 'vike/client/router'
import { PropType } from 'vue'
import { useActiveRoomStore } from '#stores/activeRoomStore'
import { Room } from '#stores/roomsStore'
const activeRoomStore = useActiveRoomStore()
/*
export interface Item {
title: string
Expand All @@ -51,11 +55,13 @@ defineProps({
},
})
const emit = defineEmits(['item-click'])
// const emit = defineEmits(['item-click'])
const handleItemClick = () => {
const handleItemClick = (link: string) => {
closeMenu()
emit('item-click')
activeRoomStore.setActiveRoom(link)
navigate('/room/')
// emit('item-click')
}
const closeMenu = () => {
// Logik zum Schließen des Menüs hinzufügen, falls erforderlich
Expand Down

0 comments on commit 37da504

Please sign in to comment.