Skip to content

chore: type product detail loader result - #42

Merged
github-actions[bot] merged 1 commit into
mainfrom
cursor/small-meaningful-improvement-4d75
Jun 7, 2026
Merged

chore: type product detail loader result#42
github-actions[bot] merged 1 commit into
mainfrom
cursor/small-meaningful-improvement-4d75

Conversation

@cursor

@cursor cursor Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added an explicit ProductPageData return type to the product detail loader.
  • Removed the render-time ProductWithCounts cast by narrowing the typed loader result after notFound().

Why it matters

This keeps the product detail page's data contract clearer and lets TypeScript validate usage closer to where the data is loaded.

Validation

  • npx eslint src/app/p/[id]/page.tsx
  • npx tsc --project tsconfig.changed-file.json --pretty false (temporary config limited to the changed page; removed afterward)

Note: npm run build compiled successfully but failed during TypeScript because the existing open-next.config.ts imports @opennextjs/cloudflare, which is not installed from the current package manifest.

Open in Web View Automation 

Co-authored-by: Sahar <SaharPak@users.noreply.github.com>
@github-actions
github-actions Bot marked this pull request as ready for review June 7, 2026 10:04
@github-actions
github-actions Bot merged commit ccbe7ce into main Jun 7, 2026
1 check passed
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