Closed Southclaws closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
storyden | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 22, 2024 10:20pm |
web/src/app/(dashboard)/t/[slug]/page.tsx (3)
`8-10`: **LGTM: Props type correctly updated for Next.js 15** The change to make `params` a Promise type aligns with Next.js 15's new async routing paradigm. --- `14-14`: **LGTM: Proper async handling of route parameters** The await on `props.params` is now correct and necessary with Next.js 15's async routing system. This is a breaking change from previous versions where params were synchronous. --- `25-26`: **LGTM: Metadata generation updated for async params** The changes to `generateMetadata` correctly handle the new async params pattern in Next.js 15. Let's verify that all metadata generators in the codebase have been updated:✅ Verification successful
Let me try a different pattern to search for metadata generators in the codebase. --- **All metadata generators are properly async, but only one uses params** Based on the search results, I found that: - All `generateMetadata` functions in the codebase are correctly declared as async - Only the file under review `web/src/app/(dashboard)/t/[slug]/page.tsx` uses `params` parameter - Other metadata generators either take no parameters or return typed PromiseThis makes sense because: 1. Only dynamic route pages (with [slug]) need params 2. Other pages are static routes where metadata doesn't depend on URL parameters 🏁 Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for any remaining synchronous metadata generators that might need updates # Look for generateMetadata functions that don't properly await params ast-grep --pattern 'export async function generateMetadata({ params }: $_) { $$$ }' ``` Length of output: 87 --- Script: ```shell #!/bin/bash # Search for all generateMetadata function declarations ast-grep --pattern 'export $_ function generateMetadata($_) { $$$ }' # Also search with ripgrep to catch any variations rg "export.*generateMetadata" -A 3 ``` Length of output: 1456
Trying https://nextjs.org/blog/next-15-rc2 v15 rc on latest Storyden frontend codebase