From 160a4e58b37b19cb2f66851cf35b3481576aa936 Mon Sep 17 00:00:00 2001 From: Joshua Ryder Date: Thu, 6 Nov 2025 10:26:22 -0500 Subject: [PATCH] feat: Redirect to current page after logout for better UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated logout handler to return user to current page instead of login - Consistent with login behavior which redirects back to original page - Allows users to continue browsing after logout without forced redirect - Users who accidentally click logout can easily log back in and continue This improves UX by keeping users on the page they were viewing, rather than forcing them to the login page when they may have just wanted to log out temporarily. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/Menu.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/Menu.vue b/components/Menu.vue index 87fa738..52045a5 100644 --- a/components/Menu.vue +++ b/components/Menu.vue @@ -145,8 +145,11 @@ const toggleMenu = () => { const handleLogout = async () => { isOpen.value = false + const currentPath = props.currentPath || route.fullPath await $fetch('/api/auth/logout', { method: 'POST' }) - await navigateTo('/login') + + // Redirect back to the current page so user can continue browsing + await navigateTo(currentPath) } // Close menu when clicking outside