Skip to content

Conversation

@Lee-Dong-Seok
Copy link
Contributor

@Lee-Dong-Seok Lee-Dong-Seok commented Feb 20, 2025

๐Ÿ“ย ์ฃผ์š” ์ž‘์—… ๋‚ด์šฉ

๋“œ๋กญ๋‹ค์šด trigger์™€ contents ๋ณ‘ํ•ฉ
filter ๊ธฐ๋Šฅ๊ณผ ์Šคํƒ€์ผ ์ปค์Šคํ…€ ๊ตฌํ˜„

๐Ÿ“บย ์Šคํฌ๋ฆฐ์ƒท

์Šคํฌ๋ฆฐ์ƒท 2025-02-20 185607
์Šคํฌ๋ฆฐ์ƒท 2025-02-20 185637

๐Ÿ”— ์ฐธ๊ณ  ์‚ฌํ•ญ

์ฝ”๋“œ๊ฐ€ ๋งŽ์ด ๋”๋Ÿฝ์Šต๋‹ˆ๋‹ค ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค..
image
preview/dropdown/page.tsx์— ์„ค๋ช… ์žˆ์Šต๋‹ˆ๋‹ค.. ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์šฉ..!

๐Ÿ’ฌย ๋ฆฌ๋ทฐ ์š”๊ตฌ์‚ฌํ•ญ

๐Ÿ“ƒย ๊ด€๋ จ ์ด์Šˆ

DEVING-35

Summary by CodeRabbit

  • New Features

    • ๋“œ๋กญ๋‹ค์šด ๋ฉ”๋‰ด ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ๊ฐœ์„ ๋˜์–ด ํ”„๋กœํ•„ ์•„์ด์ฝ˜, ์ด๋ฏธ์ง€ ์ง€์› ๋ฐ ๋™์  ์ƒํƒœ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
    • ํ•„ํ„ฐ๋ง๊ณผ ๋ฉ”๋‰ด ์˜ต์…˜(์˜ˆ: ๋งˆ์ดํŽ˜์ด์ง€, ๋กœ๊ทธ์•„์›ƒ ๋“ฑ)์ด ์—…๋ฐ์ดํŠธ๋˜์–ด ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์ด ํ–ฅ์ƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • Chores

    • ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ฐœ์„ ์„ ์œ„ํ•ด ์‚ฌ์†Œํ•œ ์ฝ”๋“œ ์ •๋ฆฌ์™€ ์ƒˆ๋กœ์šด ๊ฐœ๋ฐœ ์˜์กด์„ฑ์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

@vercel
Copy link

vercel bot commented Feb 20, 2025

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
moim-fe โŒ Failed (Inspect) Feb 20, 2025 3:49pm
moim-fe-1kc6 โŒ Failed (Inspect) Feb 20, 2025 3:49pm

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2025

Walkthrough

์ด๋ฒˆ ๋ณ€๊ฒฝ์‚ฌํ•ญ์—์„œ๋Š” pre-commit ์Šคํฌ๋ฆฝํŠธ์™€ package.json์— ์†Œํญ modification์ด ์ด๋ฃจ์–ด์กŒ์Šต๋‹ˆ๋‹ค. .husky/pre-commit ํŒŒ์ผ์—๋Š” ํŒŒ์ผ ๋์— ์ค„๋ฐ”๊ฟˆ ๋ฌธ์ž๊ฐ€ ์ถ”๊ฐ€๋˜์—ˆ์œผ๋ฉฐ, package.json์—๋Š” ๊ฐœ๋ฐœ์šฉ ์˜์กด์„ฑ์œผ๋กœ @svgr/webpack์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, dropdown ์ปดํฌ๋„ŒํŠธ์™€ ๊ด€๋ จ๋œ ๋‘ ํŒŒ์ผ(src/app/preview/dropdown/page.tsx, src/components/common/Dropdown.tsx)์—์„œ UI์™€ ์ƒํƒœ ๊ด€๋ฆฌ, ๋ฌธ์„œํ™”, ์ธํ„ฐํŽ˜์ด์Šค ๋ณ€๊ฒฝ ๋“ฑ์˜ ๊ฐœ์„ ์‚ฌํ•ญ์ด ์ ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Changes

File(s) Change Summary
.husky/pre-commit ํŒŒ์ผ ๋์— ์ค„๋ฐ”๊ฟˆ(newline) ์ถ”๊ฐ€. npx lint-staged ๋ช…๋ น์–ด๋Š” ๊ธฐ์กด๊ณผ ๋™์ผํ•˜๊ฒŒ ๋™์ž‘.
package.json devDependencies์— @svgr/webpack": "^8.1.0" ์˜์กด์„ฑ์ด ์ถ”๊ฐ€๋จ.
src/.../dropdown/page.tsx, src/.../Dropdown.tsx dropdown ๊ธฐ๋Šฅ ๊ฐœ์„ : ํŽ˜์ด์ง€์—์„œ ์ƒํƒœ ๊ด€๋ฆฌ ๋ฐ ๋ฉ”๋‰ด ์˜ต์…˜("mypage", "logout") ์ถ”๊ฐ€, SVG ์•„์ด์ฝ˜ ์ž„ํฌํŠธ์™€ ๋ฌธ์„œํ™” ๋ณด์™„; ๊ณตํ†ต Dropdown ์ปดํฌ๋„ŒํŠธ์—์„œ ์ธํ„ฐํŽ˜์ด์Šค์™€ ๋ Œ๋”๋ง ๋กœ์ง ๋ณ€๊ฒฝ.

Sequence Diagram(s)

sequenceDiagram
    participant U as ์‚ฌ์šฉ์ž
    participant P as ํŽ˜์ด์ง€ (page.tsx)
    participant D as Dropdown ์ปดํฌ๋„ŒํŠธ
    participant M as ๋ฉ”๋‰ด ์˜ต์…˜

    U->>P: ๋“œ๋กญ๋‹ค์šด ํŠธ๋ฆฌ๊ฑฐ ํด๋ฆญ
    P->>D: ๋“œ๋กญ๋‹ค์šด ๋ Œ๋”๋ง ์š”์ฒญ
    D->>U: ์˜ต์…˜(์•„์ด์ฝ˜, ๋ฉ”๋‰ด ๋“ฑ) ํ‘œ์‹œ
    U->>D: ์˜ต์…˜ ์„ ํƒ (์˜ˆ: "mypage" ๋˜๋Š” "logout")
    D->>P: ์„ ํƒ ์ƒํƒœ ์—…๋ฐ์ดํŠธ (setSelectedFilter ํ˜ธ์ถœ)
    P->>M: ์„ ํƒ ์˜ต์…˜์— ๋”ฐ๋ฅธ ์•ก์…˜ ์‹คํ–‰ (alert ๋“ฑ)
Loading

Possibly related PRs

  • Feat/component/filter/DEVING-35ย #18: dropdown ํŽ˜์ด์ง€์™€ ๊ณตํ†ต Dropdown ์ปดํฌ๋„ŒํŠธ์˜ ๊ตฌ์กฐ์™€ ๊ธฐ๋Šฅ ๋ณ€๊ฒฝ์ด ์œ ์‚ฌํ•˜์—ฌ ๊ด€๋ จ์„ฑ์ด ํฝ๋‹ˆ๋‹ค.
  • Feat/component/gnb/DEVING-15ย #13: package.json์— @svgr/webpack ์˜์กด์„ฑ ์ถ”๊ฐ€์™€ ๊ด€๋ จ๋œ ์ˆ˜์ •์œผ๋กœ ์ฝ”๋“œ ์ˆ˜์ค€์˜ ๋ณ€๊ฒฝ์ด ๊ณต์œ ๋ฉ๋‹ˆ๋‹ค.

Suggested labels

๐Ÿ› fix, ๐Ÿ’„ style, โ™ป๏ธ refactor

Suggested reviewers

  • lee1nna
  • clyde-yoonjae

Poem

๋‚˜๋Š” ์ž‘์€ ํ† ๋ผ, ํ‚ค๋ณด๋“œ๋ฅผ ๋‘๋“œ๋ฆฌ๋„ค,
์ฝ”๋“œ ์ˆฒ์„ ๋›ฐ๋†€๋ฉฐ ์ƒˆ๋กœ์šด ๊ธธ์„ ์—ด์—ˆ๋„ค.
ํ•œ ์ค„์˜ ๋ณ€๊ฒฝ์ด ๋ชจ์—ฌ ํฐ ์ˆฒ์„ ์ด๋ฃจ๊ณ ,
๋“œ๋กญ๋‹ค์šด๋„ ์ถค์ถ”๋ฉฐ ์‚ฌ์šฉ์ž์™€ ๋Œ€ํ™”ํ•˜๋„ค.
๊ฐœ๋ฐœ์˜ ์•„์นจ, ํ–‡์‚ด์ฒ˜๋Ÿผ ๋น›๋‚˜๋Š” ๋ณ€ํ™”์—ฌ,
์šฐ๋ฆฌ ๋ชจ๋‘์˜ ๋ฐœ์ž์ทจ์— ๊ฝƒ๊ธธ์ด ํ”ผ์–ด๋‚˜๊ธธ!

โœจ Finishing Touches
  • ๐Ÿ“ Generate Docstrings (Beta)

๐Ÿชง Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@dbswl701 dbswl701 left a comment

Choose a reason for hiding this comment

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

ํ•„ํ„ฐ๋ž‘ ํ† ๊ธ€์ด๋ž‘ ๋ถ„๋ฆฌ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
์‹œ์•ˆ ์ƒ ํ† ๊ธ€์€ ํŠธ๋ฆฌ๊ฑฐ ์š”์†Œ์˜ ์ƒ‰์ƒ์ด ๋ณ€ํ•˜์ง€ ์•Š๊ณ , ํ•„ํ„ฐ๋Š” ์ƒ‰์ƒ์ด ๋ณ€ํ•ฉ๋‹ˆ๋‹ค.

์ˆ˜์ • ํ›„ ๋จธ์ง€ ์ถฉ๋Œ๋‚˜๋Š” ๋ถ€๋ถ„๋„ ํ•ด๊ฒฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!!! ๐Ÿ‘๐Ÿ‘๐Ÿ‘

@vercel vercel bot temporarily deployed to Preview โ€“ moim-fe February 20, 2025 11:09 Inactive
@codecov
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests โœ…

@github-actions
Copy link

CI Status Report

๊ฒ€์‚ฌ ๊ฒฐ๊ณผ

  • Lint: โœ… success
  • Format: โœ… success
  • Type Check: โŒ failure
  • Tests: โœ… success
  • Build: โŒ failure

โŒ ์ผ๋ถ€ ๊ฒ€์‚ฌ๊ฐ€ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค.

@vercel vercel bot temporarily deployed to Preview โ€“ moim-fe February 20, 2025 15:49 Inactive
@github-actions
Copy link

CI Status Report

๊ฒ€์‚ฌ ๊ฒฐ๊ณผ

  • Lint: โœ… success
  • Format: โœ… success
  • Type Check: โŒ failure
  • Tests: โœ… success
  • Build: โŒ failure

โŒ ์ผ๋ถ€ ๊ฒ€์‚ฌ๊ฐ€ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

๐Ÿงน Nitpick comments (2)
src/components/common/Dropdown.tsx (1)

33-39: ํด๋ž˜์Šค ๊ณ„์‚ฐ ๋กœ์ง์ด ๊ฐ€๋…์„ฑ์ด ์กฐ๊ธˆ ๋–จ์–ด์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
className?.includes('w-[460px]')์œผ๋กœ ํŠน์ • ์‚ฌ์ด์ฆˆ๋ฅผ ํŒ๋ณ„ํ•˜๋Š” ๋กœ์ง์€ ์œ ์ง€๋ณด์ˆ˜๋‚˜ ํ™•์žฅ ์‹œ์— ์˜ค๋™์ž‘์„ ์ผ์œผํ‚ฌ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ณ„๋„ boolean ์ƒํƒœ prop์ด๋‚˜ ๋ถ„๋ฆฌ๋œ props๋กœ ๊ตฌ๋ถ„ํ•˜๋Š” ๋ฐฉ์•ˆ์„ ๊ณ ๋ คํ•ด ๋ณด์„ธ์š”.

-    variant !== 'default' &&
-    variant !== 'image' &&
-    !className?.includes('w-[460px]');
+    variant !== 'default' &&
+    variant !== 'image' &&
+    !hasWideSize // ๋ณ„๋„ boolean props๋กœ ๋Œ€์ฒด
src/app/preview/dropdown/page.tsx (1)

47-47: ๋ณ€์ˆ˜ ์‚ฌ์šฉ ์—ฌ๋ถ€ ํ™•์ธ
selectedFilter๋Š” ์ƒํƒœ๋กœ ์„ ์–ธ๋งŒ ๋˜์–ด ์žˆ๊ณ  ์‹ค์ œ๋กœ UI๋‚˜ ๋กœ์ง์—์„œ ์‚ฌ์šฉ๋˜์ง€ ์•Š์•„ ๋ฆฐํŠธ ๊ฒฝ๊ณ ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋„ค์ด๋ฐ์„ _selectedFilter๋กœ ๋ฐ”๊พธ๊ฑฐ๋‚˜, ์‹ค์ œ ๋กœ์ง์— ํ™œ์šฉํ•˜๋„๋ก ๊ณ ๋ คํ•ด ๋ณด์„ธ์š”.

-  const [selectedFilter, setSelectedFilter] = useState<string | null>(null);
+  const [_selectedFilter, setSelectedFilter] = useState<string | null>(null);
๐Ÿงฐ Tools
๐Ÿช› GitHub Check: check

[warning] 47-47:
'selectedFilter' is assigned a value but never used. Allowed unused vars must match /^_/u

๐Ÿ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between bb582fc and 833012c.

โ›” Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
๐Ÿ“’ Files selected for processing (4)
  • .husky/pre-commit (1 hunks)
  • package.json (1 hunks)
  • src/app/preview/dropdown/page.tsx (1 hunks)
  • src/components/common/Dropdown.tsx (1 hunks)
โœ… Files skipped from review due to trivial changes (1)
  • .husky/pre-commit
๐Ÿงฐ Additional context used
๐Ÿช› GitHub Check: check
src/app/preview/dropdown/page.tsx

[warning] 47-47:
'selectedFilter' is assigned a value but never used. Allowed unused vars must match /^_/u


[failure] 130-130:
Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.

๐Ÿช› GitHub Actions: PR Check
src/app/preview/dropdown/page.tsx

[error] 130-130: Type error: Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.

๐Ÿ”‡ Additional comments (6)
src/components/common/Dropdown.tsx (4)

9-13: ์ธํ„ฐํŽ˜์ด์Šค ์ •์˜๊ฐ€ ๋ช…๋ฃŒํ•ฉ๋‹ˆ๋‹ค.
IDropdownOption ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ์˜ต์…˜๋ณ„๋กœ ํ•„์š”ํ•œ ์†์„ฑ์„ ์ž˜ ์บก์Аํ™”ํ•ด์ฃผ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ™•์žฅ์„ฑ ์žˆ๊ฒŒ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์–ด ๋ณด์ž…๋‹ˆ๋‹ค.


15-27: ํ”„๋กœํผํ‹ฐ ์ถ”๊ฐ€ยท๋ณ€๊ฒฝ ํ™•์ธ
IDropdownProps์— ์ƒˆ๋กœ ์ถ”๊ฐ€๋œ options, variant, onChange ๋“ฑ์€ ์‹ค์ œ ์‚ฌ์šฉ์„ ๋ช…ํ™•ํžˆ ํ•ด์ฃผ๋ฉฐ ์ปดํฌ๋„ŒํŠธ ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋†’์ด๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด๋ณด๋‹ค ํ›จ์”ฌ ์œ ์—ฐํ•˜๊ฒŒ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅํ•ด ๋ณด์ž…๋‹ˆ๋‹ค.


50-54: handleSelect ์ฝœ๋ฐฑ ๊ตฌ์กฐ๊ฐ€ ์ž˜ ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์˜ต์…˜ ์„ ํƒ ์‹œ ๋ทฐ ์ƒํƒœ ๋ฐ˜์˜(setSelectedValue)๊ณผ ์™ธ๋ถ€ ์ฝœ๋ฐฑ(onChange), ๊ทธ๋ฆฌ๊ณ  ์˜ต์…˜ ๋‹จ์œ„ ์˜จ์…€๋ ‰ํŠธ๊นŒ์ง€ ๊ฐ๊ฐ ๊ตฌ๋ถ„ํ•ด์„œ ํ˜ธ์ถœํ•ด ์ฃผ๋Š” ๋กœ์ง์ด ๋ช…ํ™•ํ•ฉ๋‹ˆ๋‹ค.


92-95: CSS ์ ‘๊ทผ์„ฑ์„ ๊ฒ€ํ† ํ•ด ๋ณด์„ธ์š”.
bg-Cgray200 text-Cgray400 ์ƒ‰์ƒ ๋Œ€๋น„๊ฐ€ ์ถฉ๋ถ„ํ•˜์ง€ ์•Š์œผ๋ฉด ์‹œ์ธ์„ฑ์ด ๋–จ์–ด์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ ‘๊ทผ์„ฑ(WCAG AA) ์ธก๋ฉด์—์„œ ํ…์ŠคํŠธ ๋Œ€๋น„๋ฅผ ํ•œ๋ฒˆ ๋” ํ™•์ธํ•ด ๋ณด์‹œ๋Š” ๊ฑธ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

src/app/preview/dropdown/page.tsx (1)

100-121: ์‚ฌ์šฉ ์˜ˆ์ œ ๋ฌธ์„œํ™”๊ฐ€ ํ›Œ๋ฅญํ•ฉ๋‹ˆ๋‹ค.
์ฃผ์„์„ ํ†ตํ•ด ์ƒ์„ธํ•œ ์˜ˆ์‹œ์™€ ์˜ต์…˜ ์„ค๋ช…์ด ์ œ๊ณต๋˜์–ด ์žˆ์–ด, ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž๊ฐ€ ์‰ฝ๊ฒŒ ๋“œ๋กญ๋‹ค์šด ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์œผ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค.

package.json (1)

31-31: SVG ๋กœ๋” ์„ค์ • ํ™•์ธ
"@svgr/webpack": "^8.1.0"๊ฐ€ devDependencies๋กœ ์ถ”๊ฐ€๋˜์—ˆ์œผ๋‚˜, Next.js์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ๋•Œ์—๋Š” ์ถ”๊ฐ€ ์„ค์ •(์˜ˆ: next.config.js)์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ์„ค์ •์ด ๋ˆ„๋ฝ๋˜๋ฉด SVG import ์‹œ ์‚ฌ์šฉ ์˜๋„๋Œ€๋กœ ๋™์ž‘ํ•˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์œผ๋‹ˆ ํ™•์ธํ•ด ๋ณด์„ธ์š”.

options={menuOptions}
variant="image"
imageProps={{
src: profile,
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue

์ด๋ฏธ์ง€ ์†Œ์Šค ํƒ€์ž… ์—๋Ÿฌ ๋ฐœ์ƒ
profile๊ฐ€ SVG React ์ปดํฌ๋„ŒํŠธ๋กœ ํŒ๋‹จ๋˜์–ด Image ์ปดํฌ๋„ŒํŠธ์— ์ „๋‹ฌ๋  ๋•Œ ํƒ€์ž… ๋ถˆ์ผ์น˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. @svgr/webpack ์‚ฌ์šฉ ์‹œ, ?url ์ฟผ๋ฆฌ๋กœ ์‹ค์ œ ๊ฒฝ๋กœ ๋ฌธ์ž์—ด์„ ๋ถˆ๋Ÿฌ์˜ค๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๋„๋ก ๊ตฌ์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์•„๋ž˜์™€ ๊ฐ™์€ ํ˜•ํƒœ๋กœ ์ˆ˜์ •ํ•˜์—ฌ Image์— URL์„ ์ „๋‹ฌํ•ด ๋ณด์„ธ์š”:

-import profile from '@/assets/icon/profile.svg';
+import profileUrl from '@/assets/icon/profile.svg?url';

...

 imageProps={{
-  src: profile,
+  src: profileUrl,
   width: 40,
   height: 40,
   ...
 }}
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
src: profile,
- import profile from '@/assets/icon/profile.svg';
+ import profileUrl from '@/assets/icon/profile.svg?url';
...
imageProps={{
- src: profile,
+ src: profileUrl,
width: 40,
height: 40,
...
}}
๐Ÿงฐ Tools
๐Ÿช› GitHub Check: check

[failure] 130-130:
Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.

๐Ÿช› GitHub Actions: PR Check

[error] 130-130: Type error: Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.

@Lee-Dong-Seok Lee-Dong-Seok deleted the feat/component/Filter/DEVING-35 branch February 21, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants