Skip to content

Commit

Permalink
fix: Next.js 13.5.6 rules around use-client & static params
Browse files Browse the repository at this point in the history
  • Loading branch information
codinsonn committed Nov 2, 2023
1 parent 17a664a commit f7f6d98
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/next/app/(generated)/bio/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use client'
// -i- Automatically generated by 'yarn link-routes', do not modify manually
export { default, dynamic, generateStaticParams } from 'links-page/routes/bio/[slug]'
export { default, dynamic } from 'links-page/routes/bio/[slug]'
6 changes: 1 addition & 5 deletions features/cv-page/screens/ResumeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,7 @@ export const ResumeScreenRouteDataConfig = {
/* --- Route Segments -------------------------------------------------------------------------- */

// -i- https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
export const dynamic = 'force-static' // 'auto' | 'force-dynamic' | 'error' | 'force-static'

export const generateStaticParams = async (): Promise<TResumeScreenParams[]> => {
return [{ slug: 'codinsonn' }]
}
export const dynamic = 'auto' // 'auto' | 'force-dynamic' | 'error' | 'force-static'

/* --- <ResumeScreen/> ------------------------------------------------------------------------- */

Expand Down
1 change: 0 additions & 1 deletion features/links-page/routes/bio/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ const PageScreen = (props: bioScreen.BioScreenProps) => (
/* --- Exports --------------------------------------------------------------------------------- */

export const dynamic = bioScreen.dynamic
export const generateStaticParams = bioScreen.generateStaticParams

export default PageScreen
6 changes: 1 addition & 5 deletions features/links-page/screens/BioScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ export const screenConfig = {

/* --- Segments -------------------------------------------------------------------------------- */

export const dynamic = 'force-static' // 'auto' | 'force-dynamic' | 'error' | 'force-static'

export const generateStaticParams = async (): Promise<BioScreenParams[]> => {
return [{ slug: 'codinsonn' }]
}
export const dynamic = 'auto' // 'auto' | 'force-dynamic' | 'error' | 'force-static'

/* --- <BioScreen/> ---------------------------------------------------------------------------- */

Expand Down

0 comments on commit f7f6d98

Please sign in to comment.