-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix(web): Prevent Organizationpage.menuLinks field from containing null primary links #17601
fix(web): Prevent Organizationpage.menuLinks field from containing null primary links #17601
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
libs/cms/src/lib/models/organizationPage.model.ts (1)
131-133
: LGTM! Consider enhancing type safety.The filter implementation correctly removes link groups with null primary links, addressing the PR objective. However, consider making it more type-safe:
- .filter((linkGroup) => Boolean(linkGroup?.primaryLink)), + .filter((linkGroup): linkGroup is LinkGroup & { primaryLink: NonNullable<LinkGroup['primaryLink']> } => + Boolean(linkGroup?.primaryLink)),
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
libs/cms/src/lib/models/organizationPage.model.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
libs/cms/src/lib/models/organizationPage.model.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
🔇 Additional comments (1)
libs/cms/src/lib/models/organizationPage.model.ts (1)
Line range hint
1-150
: Excellent adherence to coding guidelines.The file structure follows best practices for shared libraries:
- Uses TypeScript effectively with proper type definitions
- Implements GraphQL decorators consistently
- Exports types and functions clearly, enabling effective tree-shaking
- Components and types are reusable across NextJS apps
Datadog ReportAll test runs ✅ 10 Total Test Services: 0 Failed, 10 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (1)
|
Prevent Organizationpage.menuLinks field from containing null primary links
What
Checklist:
Summary by CodeRabbit