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

Fixed LayoutProps type typos #164

Merged
merged 1 commit into from
Nov 12, 2023
Merged

Fixed LayoutProps type typos #164

merged 1 commit into from
Nov 12, 2023

Conversation

mocanew
Copy link
Contributor

@mocanew mocanew commented Nov 11, 2023

No description provided.

@mocanew mocanew marked this pull request as ready for review November 11, 2023 11:54
Copy link

vercel bot commented Nov 11, 2023

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

Name Status Preview Comments Updated (UTC)
next-roots ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2023 11:56am

@svobik7
Copy link
Owner

svobik7 commented Nov 12, 2023

Hi @mocanew,

could you please elaborate a bit on the motivation behind this PR?

IMO: I would keep the ‘pageLocale’ naming here. It was done on purpose to distinguish from native nextjs i18n naming https://nextjs.org/docs/pages/building-your-application/routing/internationalization. Also it would be unnecessary breaking change.

@mocanew
Copy link
Contributor Author

mocanew commented Nov 12, 2023

I should've stated the problem from the get-go: the type LayoutProps is not accurate/in-sync with generated code. I see no problem with either naming, but I assumed the implementation to be correct rather than the type.

Here's one example that uses locale instead of pageLocale (I assume the other examples are the same): https://github.com/svobik7/next-roots/blob/master/examples/basic/src/features/common/components/Layout.tsx#L32. Also, RootLayoutProps should extend LayoutProps.

@svobik7
Copy link
Owner

svobik7 commented Nov 12, 2023

Oh, you are right. For Layout it should be only locale. So your fix is right. Thank you 👍

@svobik7 svobik7 merged commit d9fb3f4 into svobik7:master Nov 12, 2023
2 checks passed
Copy link

🎉 This PR is included in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants