Update packages/web/lib/hooks/useHandleAddUrl.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Timothy Atapagra 2025-07-09 16:31:15 -04:00
parent 0927294546
commit 23014444f0

View file

@ -22,10 +22,7 @@ export const useHandleAddUrl = () => {
return Promise.resolve()
})
// Navigate to library after successful save
setTimeout(() => {
router.push('/home')
}, 1000)
// Navigation to /home is handled via the toast action callback
} else {
showErrorToast('Error saving url', { position: 'bottom-right' })
throw new Error('Failed to save URL')