fix: critical bug fixes - routes UUID, image paths, favorites loading, bottom nav debounce
This commit is contained in:
@ -14,12 +14,20 @@ const navItems = [
|
||||
{ name: 'taxi', path: '/taxi', icon: 'directions_bus' }
|
||||
]
|
||||
|
||||
let isNavigating = false
|
||||
|
||||
const navigateTo = (path: string) => {
|
||||
router.push(path)
|
||||
// Prevent rapid multiple navigations (debounce guard)
|
||||
if (isNavigating) return
|
||||
if (route.path === path) return
|
||||
isNavigating = true
|
||||
router.push(path).finally(() => {
|
||||
setTimeout(() => { isNavigating = false }, 300)
|
||||
})
|
||||
}
|
||||
|
||||
const isActive = (path: string) => {
|
||||
return route.path === path
|
||||
return route.path === path || route.path.startsWith(path + '/')
|
||||
}
|
||||
|
||||
// Scroll detection logic
|
||||
|
||||
Reference in New Issue
Block a user