Skip to content

feat(fe): import SVGR in svg files#3535

Open
seoeun9 wants to merge 3 commits intomainfrom
t2617-svg-file-integration
Open

feat(fe): import SVGR in svg files#3535
seoeun9 wants to merge 3 commits intomainfrom
t2617-svg-file-integration

Conversation

@seoeun9
Copy link
Copy Markdown
Contributor

@seoeun9 seoeun9 commented Apr 7, 2026

Description

Additional context


Before submitting the PR, please make sure you do the following

@seoeun9 seoeun9 self-assigned this Apr 7, 2026
@seoeun9 seoeun9 added ⛳️ team-frontend preview 이 라벨이 붙어있어야 프론트엔드 Preview 환경이 생성됩니다 labels Apr 7, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

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.

@skkuding-bot
Copy link
Copy Markdown

skkuding-bot bot commented Apr 7, 2026

Syncing Preview App Failed

Application: frontend
Revision: 79400cec1bcf9d346f2c157322a675bc5ab59d2a
Health Status: Degraded

Open Preview | View in Argo CD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview 이 라벨이 붙어있어야 프론트엔드 Preview 환경이 생성됩니다 ⛳️ team-frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant