Skip to content

fix: FileDropzone 엄격한 동등 연산자 및 Tailwind 클래스 정리#325

Merged
AndyH0ng merged 2 commits intodevelopfrom
copilot/fix-strict-inequality-operator
Mar 2, 2026
Merged

fix: FileDropzone 엄격한 동등 연산자 및 Tailwind 클래스 정리#325
AndyH0ng merged 2 commits intodevelopfrom
copilot/fix-strict-inequality-operator

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

FileDropzone.tsx의 느슨한 비교 연산자(!=) 사용과 잘못된 Tailwind 클래스를 수정합니다.

변경 사항

  • 엄격한 비교 연산자 적용: handleFile, handleDrop 두 곳에서 !=!== 로 교체

    // before
    if (typeof onFileSelected != 'function') return;
    // after
    if (typeof onFileSelected !== 'function') return;
  • Tailwind 클래스 순서 수정: w-full mt-10mt-10 w-full (레이아웃 → 간격 순서)

  • 잘못된 pseudo-class 제거: not-visited:transitiontransition (유효하지 않은 Tailwind 클래스)

Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"Use strict inequality operator !== instead of != for type checking. The loose inequality operator can lead to unexpected type coercion.","fixFiles":[{"filePath":"src/components/common/FileDropzone.tsx","diff":"diff --git a/src/components/common/FileDropzone.tsx b/src/components/common/FileDropzone.tsx\n--- a/src/components/common/FileDropzone.tsx\n+++ b/src/components/common/FileDropzone.tsx\n@@ -56,7 +56,7 @@\n     const file = fileList.item(0);\n     if (!file) return;\n \n-    if (typeof onFileSelected != 'function') return;\n+    if (typeof onFileSelected !== 'function') return;\n     onFileSelected(file);\n \n     if (inputRef.current) inputRef.current.value = ''; // 같은 파일 다시 선택 가능하게 (선택창 value 초기화)\n"}]},{"message":"Use strict inequality operator !== instead of != for type checking. The loose inequality operator can lead to unexpected type coercion.","fixFiles":[{"filePath":"src/components/common/FileDropzone.tsx","diff":"diff --git a/src/components/common/FileDropzone.tsx b/src/components/common/FileDropzone.tsx\n--- a/src/components/common/FileDropzone.tsx\n+++ b/src/components/common/FileDropzone.tsx\n@@ -101,7 +101,7 @@\n     const file = e.dataTransfer.files?.item(0);\n     if (!file) return;\n \n-    if (typeof onFileSelected != 'function') return;\n+    if (typeof onFileSelected !== 'function') return;\n     onFileSelected(file);\n   };\n \n"}]},{"message":"Tailwind CSS class order convention: utility classes should follow a consistent order. Place spacing utilities (mt-10) before width utilities (w-full) or use the recommended class order: layout, then spacing.","fixFiles":[{"filePath":"src/components/common/FileDropzone.tsx","diff":"diff --git a/src/components/common/FileDropzone.tsx b/src/components/common/FileDropzone.tsx\n--- a/src/components/common/FileDropzone.tsx\n+++ b/src/components/common/FileDropzone.tsx\n@@ -126,7 +126,7 @@\n   };\n \n   return (\n-    <div className=\"w-full mt-10\">\n+    <div className=\"mt-10 w-full\">\n       <input\n         ref={inputRef}\n         type=\"file\"\n"}]},{"message":"The pseudo-class 'not-visited:transition' appears to be invalid. The correct syntax should be 'transition' without the 'not-visited:' prefix, or if you meant to exclude visited states, consider using standard transition utilities.","fixFiles":[{"filePath":"src/components/common/FileDropzone.tsx","diff":"diff --git a/src/components/common/FileDropzone.tsx b/src/components/common/FileDropzone.tsx\n--- a/src/components/common/FileDropzone.tsx\n+++ b/src/components/common/FileDropzone.tsx\n@@ -160,7 +160,7 @@\n             shouldBlurBase && 'blur-sm opacity-40',\n           )}\n         >\n-          <div className=\"flex h-12 w-12 items-center justify-center rounded-full bg-gray-800 not-visited:transition group-hover:bg-gray-900\">\n+          <div className=\"flex h-12 w-12 items-center justify-center rounded-full bg-gray-800 transition group-hover:bg-gray-900\">\n             <UploadIcon className=\"h-5 w-5 text-white\" />\n           </div>\n           <div className=\"space-y-2 text-center\">\n"}]}]

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…FileDropzone

Co-authored-by: AndyH0ng <60703412+AndyH0ng@users.noreply.github.com>
@github-actions github-actions bot added the component 컴포넌트 관련 변경 label Mar 2, 2026
Copilot AI changed the title [WIP] Fix use of strict inequality operator in FileDropzone component fix: FileDropzone 엄격한 동등 연산자 및 Tailwind 클래스 정리 Mar 2, 2026
@AndyH0ng AndyH0ng marked this pull request as ready for review March 2, 2026 04:34
@AndyH0ng AndyH0ng merged commit f19019f into develop Mar 2, 2026
8 checks passed
@AndyH0ng AndyH0ng deleted the copilot/fix-strict-inequality-operator branch March 2, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component 컴포넌트 관련 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants