-
Notifications
You must be signed in to change notification settings - Fork 5
chore: upgrade next #1208
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: upgrade next #1208
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Bug: Icon Mismatch Breaks BuildingBlock Rendering Runtime Error
The BuildingBlock component always renders the icon using <Icon icon={_icon as LucideIcon} .../>, but doesn't check if _icon is an IconComponent function first. Unlike the Tool and ContentCard components which use typeof _icon === "function" to conditionally render IconComponent functions by calling them directly, BuildingBlock will incorrectly pass IconComponent functions to the Icon component, which expects a LucideIcon type. This will cause runtime errors when IconComponent icons (like those from the Icons object) are used with BuildingBlock.
components/ui/OverviewContent/Blocks.tsx#L211-L226
docs/components/ui/OverviewContent/Blocks.tsx
Lines 211 to 226 in 4cbac65
| </MenuItem> | |
| ); | |
| }; | |
| export const BuildingBlock = ({ | |
| title, | |
| description, | |
| icon, | |
| href = "#", | |
| }: { | |
| title: string; | |
| description: string; | |
| icon: IconType; | |
| href: string; | |
| }) => { | |
| const _icon = getIcon(icon); |
MikeCarbone
left a comment
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.
Tested many pages through the preview link. Each major page type appears to be functioning as expected. Code is fine, glad types are cleaned up. Thanks for doing that!
Description
Upgrades
nextandreactto the latest versions, this included a few other updates to get things working. There are no functional changes to the code. All code related updates are strictly type changes. In addition to this, the linting has changed with next so this swaps out our the previous linting config with a comparable on that works with the latest version of next.