Skip to content

Add missing React type import in GithubIcon component #2

@coderabbitai

Description

@coderabbitai

Issue Description

The GithubIcon component in src/components/icons/GithubIcon.tsx references React.SVGProps without importing React types. This may cause TypeScript errors.

Recommended Fix

Add a type-only import and update the function signature:

+import type { SVGProps } from "react";

-export function GithubIcon(props: React.SVGProps<SVGSVGElement>) {
+export function GithubIcon(props: SVGProps<SVGSVGElement>) {

Context

This issue was identified during code review in PR: #1

Original comment: #1 (comment)

This type-only import approach is recommended for React components using TypeScript, as it:

  • Only imports the type definitions (not the runtime React code)
  • Results in cleaner imports
  • Follows current React best practices with TypeScript

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions