-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: remove router groups, add LayoutHOC #156
Conversation
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
apps/web/app/layoutHOC.tsx
Outdated
import PageWrapper from "@components/PageWrapperAppDir"; | ||
|
||
type WithLayoutParams<T> = { | ||
getLayout?: ((page: React.ReactElement) => JSX.Element) | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should always ensure getLayout
parameter is at least null
?
apps/web/app/layoutHOC.tsx
Outdated
nonce={nonce} | ||
themeBasis={null} | ||
{...props}> | ||
{Page ? props ? <Page {...props} /> : <></> : "children" in restProps ? restProps.children : <></>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- are these nested ternary expressions? (hard to follow them, perhaps we should use a helper variable?)
- can we replace
<></>
withnull
?
What does this PR do?
Fixes # (issue)
Requirement/Documentation
Type of change
How should this be tested?
Mandatory Tasks
Checklist