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

Add children to AppRouterPageRouteOpts to support Layout usage #1678

Closed
wants to merge 1 commit into from

Conversation

perenstrom
Copy link

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

📋 Changes

  • Added children as an accepted parameter to withPageAuthRequired, which is necessary for usage in Layout files.

📎 References

#1643

🎯 Testing

Wrap a Layout file in withPageAuthRequired and add the parameters { children }: { children?: React.ReactNode } to the Layout function.

This will add `children` as an accepted parameter to `withPageAuthRequired`, which is necessary for usage in Layout files.
@perenstrom
Copy link
Author

perenstrom commented Feb 24, 2024

This apparently breaks the build for some reason I can't figure out at the moment for Pages, since they're not allowed to have children. Closing this until I (hopefully) find out why so I can let people who actually know what they're doing fix this problem. 😅

@perenstrom perenstrom closed this Feb 24, 2024
@dopry
Copy link

dopry commented Apr 11, 2024

@perenstrom it's okay to have multiple PRs for the same thing I think if you wanted to re-open. Maybe some other developers would help you out if you were specific about what is breaking for Pages? When you say Pages do you mean the Page Router or page.tsx?

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