feat: add error handling for sessionStorage in redirect logic across multiple pages
This commit is contained in:
@@ -77,7 +77,7 @@ export default function CalendarPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!isAuthenticated) {
|
||||
try { sessionStorage.setItem('redirect_after_login', window.location.pathname); } catch {}
|
||||
try { sessionStorage.setItem('redirect_after_login', window.location.pathname); } catch { /* ignore */ }
|
||||
router.push("/login");
|
||||
} else if (!supportsCalendar) {
|
||||
router.push("/");
|
||||
|
||||
Reference in New Issue
Block a user