DONE: fix error on top-menu to for mobile view
This commit is contained in:
@@ -10,12 +10,19 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const open = defineModel<boolean>('open', { default: false })
|
||||
const authStore = useAuthStore()
|
||||
|
||||
function handleClick(event: MouseEvent) {
|
||||
if (!window.matchMedia('(max-width: 1279px)').matches) return
|
||||
event.stopPropagation()
|
||||
open.value = !open.value
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="['side-menu__account group/profile transition-[width]', props.class]">
|
||||
<div :class="['flex cursor-pointer items-center transition', props.innerClass]">
|
||||
<div :class="['flex cursor-pointer items-center transition', props.innerClass]" @click="handleClick">
|
||||
<div :class="[
|
||||
'relative flex-none overflow-hidden rounded-full border-4',
|
||||
props.avatarClass ?? 'h-10 w-10 border-background/20 dark:border-foreground/20',
|
||||
|
||||
Reference in New Issue
Block a user