You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add default 404 page and loading state to project example (#1257)
* fix(examples): handle undefined project in React projects example
Add a guard in the ProjectPage component to handle the case where the
project or user membership data hasn't loaded yet, preventing the
"Cannot read properties of undefined (reading 'name')" crash. Also add
a defaultNotFoundComponent to the router to handle invalid routes
gracefully instead of throwing an unconfigured notFoundError.
Fixes#889https://claude.ai/code/session_01QJP1o2CKx7s9iLPNEkwcuP
* refactor(examples): validate project in loader and extract NotFound component
Throw notFound() from the route loader when the project ID is invalid
or doesn't exist, instead of showing a misleading "Loading..." message.
Extract NotFound into a reusable component using Link for client-side
navigation, consistent with the todo and offline-transactions examples.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(examples): fix auth routing and move project creation to loader
- Move auth API route to catch-all (api/auth/$.ts) so Better Auth
sub-paths like /api/auth/sign-up/email are handled correctly
- Add baseURL and port 5174 to Better Auth trusted origins
- Move default project creation from useEffect into beforeLoad so
data is ready before first render, eliminating race conditions
- Wait for project to persist before redirecting to get server-assigned ID
- Remove unused useEffect and isLoading from authenticated layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: apply automated fixes
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
0 commit comments