From 79b78df0783b9951c76024fe2abee0009e8a2ddc Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Mon, 9 Mar 2026 15:14:51 +0000
Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=A7=B9=20Refactor=20ProfileCard=20to?=
=?UTF-8?q?=20use=20smaller=20internal=20components?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
---
src/components/ProfileCard.tsx | 283 +++++++++++++++++----------------
1 file changed, 150 insertions(+), 133 deletions(-)
diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx
index 4d9d41b..fc379e6 100644
--- a/src/components/ProfileCard.tsx
+++ b/src/components/ProfileCard.tsx
@@ -4,6 +4,151 @@ type Props = {
profile: UserProfile;
};
+// Internal components for modularity
+const Avatar = ({ url, login }: { url: string; login: string }) => (
+
- {/* Avatar */}
-
-
-

-
+
- {/* Info */}
@@ -36,132 +172,13 @@ export default function ProfileCard({ profile }: Props) {
{profile.bio}
)}
- {/* Meta */}
-
-
- {/* Stats */}
-
-
-
- {profile.followers.toLocaleString()}
-
-
Followers
-
-
-
- {profile.following.toLocaleString()}
-
-
Following
-
-
-
- {profile.public_repos.toLocaleString()}
-
-
Repos
-
-
+
+
- {/* Organizations */}
- {profile.orgs.length > 0 && (
-
- )}
-
- {/* Pinned Repos */}
- {profile.pinnedRepos.length > 0 && (
-
-
Pinned Repositories
-
-
- )}
+
+
);
}
From 68ede9d591fe71548d70451143ba287f4024db90 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Fri, 13 Mar 2026 06:40:19 +0000
Subject: [PATCH 2/5] refactor(CardGenerator): replace img element with
next/image
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
---
pr_body.md | 11 +++++++++++
src/components/CardGenerator.tsx | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 pr_body.md
diff --git a/pr_body.md b/pr_body.md
new file mode 100644
index 0000000..adbb8e8
--- /dev/null
+++ b/pr_body.md
@@ -0,0 +1,11 @@
+🎯 **What:** The code health issue addressed
+Replaced the plain `
![]()
` element in `src/components/CardGenerator.tsx` with Next.js's `
` component, which is the recommended way to handle images in Next.js applications, resolving an `@next/next/no-img-element` ESLint bypass.
+
+💡 **Why:** How this improves maintainability
+The usage of `
` component is a Next.js standard best practice that usually provides automatic optimizations. Although this particular instance requires `unoptimized` because it relies on a local dynamically generated data URL from `html-to-image`, using the uniform standard throughout the application helps remove linting suppression rules, keeping code clean and maintaining consistent components across the codebase.
+
+✅ **Verification:** How you confirmed the change is safe
+Ran the lint check (`npm run lint`), which no longer produces the ESLint warning on `CardGenerator.tsx`. Also ran the full unit test suite (`npm run test`) which executed 100 tests with no failures, verifying that we didn't break anything.
+
+✨ **Result:** The improvement achieved
+A clean resolution to the `@next/next/no-img-element` linting rule in `CardGenerator.tsx` by upgrading it to use the standard `
` element from `next/image`.
diff --git a/src/components/CardGenerator.tsx b/src/components/CardGenerator.tsx
index c663121..58f731c 100644
--- a/src/components/CardGenerator.tsx
+++ b/src/components/CardGenerator.tsx
@@ -2,6 +2,7 @@
import { useState, useRef, useCallback, useEffect } from "react";
import { createPortal } from "react-dom";
+import Image from "next/image";
import { toPng, toBlob } from "html-to-image";
import type {
@@ -394,8 +395,7 @@ export default function CardGenerator({ summary }: Props) {
Generating preview...
) : previewUrl ? (
- // eslint-disable-next-line @next/next/no-img-element
-