diff --git a/frontend/components/global/SideDrawer.vue b/frontend/components/global/SideDrawer.vue index bd434ff..9bb0fae 100644 --- a/frontend/components/global/SideDrawer.vue +++ b/frontend/components/global/SideDrawer.vue @@ -20,6 +20,8 @@ defineProps(); const { token } = useAuth(); const { data: account } = useGetAccount(); +const route = useRoute(); + // emit const emit = defineEmits(["update:modelValue"]); @@ -29,13 +31,22 @@ const emit = defineEmits(["update:modelValue"]); const closeSideDrawer = () => { emit("update:modelValue", false); }; + +// watch + +watch( + () => route.fullPath, + () => { + closeSideDrawer(); + } +);