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

refactor: migrate to Next.js routing params type #48

Open
wit03 opened this issue Oct 9, 2024 · 0 comments
Open

refactor: migrate to Next.js routing params type #48

wit03 opened this issue Oct 9, 2024 · 0 comments

Comments

@wit03
Copy link
Member

wit03 commented Oct 9, 2024

          _:hammer_and_wrench: Refactor suggestion_

Consider using 'Params' type from Next.js for routing parameters

Next.js provides built-in types for routing parameters. Using Params can improve type safety and consistency.

Apply this diff to use the built-in type:

- interface PageProps {
-   params: {
-     name: string
-   }
- }
+ import { Params } from 'next/dist/shared/lib/router/utils/route-matcher'

+ interface PageProps {
+   params: Params
+ }

Committable suggestion was skipped due to low confidence.

Originally posted by @coderabbitai[bot] in #46 (comment)

@wit03 wit03 changed the title 🛠️ migrate to Next.js routing params type refactor: migrate to Next.js routing params type Oct 9, 2024
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

No branches or pull requests

1 participant