Skip to content

Title: fix(site): resolve chunk error and logout navigation - #949

Draft
rcjasub wants to merge 1 commit into
mainfrom
fix/chunk-error-news-logout
Draft

Title: fix(site): resolve chunk error and logout navigation#949
rcjasub wants to merge 1 commit into
mainfrom
fix/chunk-error-news-logout

Conversation

@rcjasub

@rcjasub rcjasub commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #848

Resolves two related issues reported on the /news page and after logout:

  • Logout error: auth-client.ts was calling redirect('/') from next/navigation, which is server-only. Calling it from a client context throws an unhandled error that triggers the React error boundary. Replaced with window.location.replace('/') which works correctly in the browser and is more appropriate for logout since it clears all client state.
  • Incorrect page directive: news/page.tsx had a 'use server' directive which marks exports as Server Actions rather than a Server Component. Removed — pages are Server Components by Next.js convention.
  • ChunkLoadError: After a new deployment, chunk filenames change. Clients with cached HTML fetch stale chunk URLs that 404, triggering React error fix(db): auto-update updatedAt timestamps #418. Added a ChunkLoadError check in app/error.tsx that reloads the page once when detected. A sessionStorage flag prevents an infinite reload loop if the error persists.

Checklist

  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • Any components that you've modified are accessible.
  • You've used conventional commits where appropriate

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
internal-dashboard Ready Ready Preview, Comment Jun 18, 2026 4:19am
nightcrawler Ready Ready Preview, Comment Jun 18, 2026 4:19am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Chunk error after logging out and/or navigating to /news page

1 participant