-
Notifications
You must be signed in to change notification settings - Fork 465
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: box border color in tx details #4668
Conversation
Branch preview✅ Deploy successful! Website: Storybook: |
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.
Code review by ChatGPT
{...props} | ||
/> | ||
) | ||
} | ||
}) |
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.
- The change to use
memo
can improve performance by preventing unnecessary re-renders. Ensure all props used deeply are immutable or compare function is provided. - Consider extracting the repeated styles definition code in
Box
andTypography
into a utility function to adhere to the DRY principle. - Ensure that
omitBy
correctly handles all edge cases when removing undefined values to prevent unintended styling loss. - The import statement
export * from '@mui/material/index'
can potentially lead to namespace pollution. Consider importing only necessary components.
Can you include a before screenshot please? |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
1016.46 KB (🟡 +135 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
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.
Not sure why omitBy and isUndefined are needed. Is it causing performance issues without?
Coverage report
Test suite run success1707 tests passing in 231 suites. Report generated by 🧪jest coverage report action from b0872bb |
You can see lots of undefined props passed in the React dev extension. |
What it solves
Border color wasn't properly passed to a Box because of the prop order.
I've also added omitBy to exclude unnecessary undefined properties passed to sx.