Skip to content

fix: Make page params async and simplify API route#537

Closed
pmilano1 wants to merge 1 commit into
mainfrom
fix/page-params-async
Closed

fix: Make page params async and simplify API route#537
pmilano1 wants to merge 1 commit into
mainfrom
fix/page-params-async

Conversation

@pmilano1

Copy link
Copy Markdown
Owner

Summary

  • Make page component async and await params Promise (Next.js 15 requirement)
  • Refactor API route to query database directly instead of using GraphQL client
  • This fixes the 404 error caused by undefined being passed as the family parameter

Root Cause

The page component wasn't awaiting the params Promise, so undefined was being passed to the client component, resulting in /api/family-notes/undefined 404 errors.

Changes

  1. app/family-notes/[family]/page.tsx: Made async, await params
  2. app/api/family-notes/[family]/route.ts: Query database directly, simplified logic

Fixes the family notes 404 issue.

🤖 Generated with Claude Code

- Page component now awaits params (Next.js 15)
- API route queries database directly (no GraphQL client issues)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@pmilano1 pmilano1 force-pushed the fix/page-params-async branch from f6bf5b8 to 6922fcb Compare February 14, 2026 19:36
@pmilano1 pmilano1 closed this Feb 14, 2026
@pmilano1 pmilano1 deleted the fix/page-params-async branch February 21, 2026 17:12
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.

1 participant