Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Optimize product page static generation #393

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

Mohmdev
Copy link
Contributor

@Mohmdev Mohmdev commented Nov 7, 2024

#391
This pull request includes changes to fix the error caused by generateStaticParams in src/app/[countryCode]/(main)/products/[handle]/page.tsx.

Problem:

  • Production build fails with DYNAMIC_SERVER_USAGE error
  • Multiple unnecessary API calls during static generation

Fix:

  • Single optimized SDK call for product handles
  • Improved error handling
  • Maintains Next.js caching patterns

Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextjs-starter-medusa-38xf ❌ Failed (Inspect) Nov 12, 2024 10:03am
storefront-v2-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 10:03am

Copy link

vercel bot commented Nov 7, 2024

@Mohmdev is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

@VariableVic
Copy link
Collaborator

LGTM, thanks for the contribution!

@VariableVic VariableVic merged commit 0058c52 into medusajs:main Nov 12, 2024
3 of 6 checks 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.

2 participants