Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates SVG handling to React components using @svgr/webpack, refactoring numerous components to render SVGs directly and updating SVG files to use currentColor for styling. Feedback identifies critical issues where some SVGs are still incorrectly used with the Next.js Image component in MobileMenu.tsx, which will cause runtime errors. Additionally, it is recommended to uncomment and fix the SVG type definitions and add an issuer restriction to the Webpack configuration to avoid breaking SVG usage in non-JS files.
| import loginMobileIcon from '@/public/icons/login-mobile.svg' | ||
| import logoutMobileIcon from '@/public/icons/logout-mobile.svg' | ||
| import noticeIcon from '@/public/icons/notice.svg' | ||
| import noticeIcon from '@/public/icons/notification.svg' |
There was a problem hiding this comment.
This change transforms noticeIcon into a React component via SVGR. However, it (and other SVG imports in this file) is still being used as a src for the Image component in several places (e.g., lines 70, 94, 120, 141, 174). The Image component will fail at runtime when passed a React component. You must update all Image usages in this file to render the icons as components instead (e.g., ). Also, consider capitalizing the import names (e.g., NoticeIcon, LoginMobileIcon) to follow React component naming conventions.
|
❗ Syncing Preview App Failed Application: |
Description
Additional context
Before submitting the PR, please make sure you do the following
fixes #123).