Skip to content

Conversation

@itschetna
Copy link
Contributor

@itschetna itschetna commented Aug 1, 2025

Related Issue


Description

This PR adds a GitHub Metrics Preview to the user profile page.
A new MetricCard component was created which embeds metrics.lecoq.io for the given username.

Added MetricCard.tsx component

Integrated MetricCard into UserProfile.tsx under a new GitHub Metrics section

Shows a loading state until the metrics iframe is ready


How Has This Been Tested?

Confirmed that the metrics iframe loads dynamically based on the username from route params.

Loading indicator disappears once metrics are displayed.


Screenshots (if applicable)

no


Type of Change

  • New feature

Summary by CodeRabbit

  • New Features
    • Introduced a "GitHub Metrics" section to user and contributor profiles, displaying a metrics card with relevant information for the specified username.
    • The metrics card includes a loading indicator while data is being fetched and is seamlessly integrated above the pull requests list.
    • Added a detailed user profile view showing avatar, login, bio, and a list of pull requests as clickable links.

@netlify
Copy link

netlify bot commented Aug 1, 2025

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit dba30f8
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/688cb1b1afd58c0007a46a60
😎 Deploy Preview https://deploy-preview-168--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 1, 2025

Walkthrough

A new MetricCard React component was introduced to display GitHub metrics for a user using an iframe. The UserProfile page was updated to include a "GitHub Metrics" section above the pull requests list, embedding the MetricCard and passing the relevant username as a prop. Additionally, the ContributorProfile component was enhanced to include the same "GitHub Metrics" section with the MetricCard.

Changes

Cohort / File(s) Change Summary
MetricCard Component Addition
src/components/MetricCard.tsx
Introduced a new MetricCard functional component that displays a metrics iframe for a given username, manages loading state, and handles conditional rendering.
UserProfile Integration
src/pages/UserProfile/UserProfile.tsx
Added a "GitHub Metrics" UI section to the user profile page, importing and rendering the MetricCard with the user's username.
ContributorProfile Enhancement
src/pages/ContributorProfile/ContributorProfile.tsx
Added a "GitHub Metrics" section rendering the MetricCard with the current username above the pull requests section.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant UserProfile as UserProfile Component
    participant ContributorProfile as ContributorProfile Component
    participant MetricCard as MetricCard Component
    participant MetricsSite as metrics.lecoq.io

    User->>UserProfile: Open user profile page
    UserProfile->>MetricCard: Render MetricCard(username)
    MetricCard->>MetricsSite: Load metrics iframe for username
    MetricsSite-->>MetricCard: Iframe content loaded
    MetricCard->>UserProfile: Display metrics preview

    User->>ContributorProfile: Open contributor profile page
    ContributorProfile->>MetricCard: Render MetricCard(username)
    MetricCard->>MetricsSite: Load metrics iframe for username
    MetricsSite-->>MetricCard: Iframe content loaded
    MetricCard->>ContributorProfile: Display metrics preview
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Add metrics preview of a user using metrics.lecoq.io embed (#50)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Suggested labels

level2

Poem

A hop, a skip, a metrics card appears,
Showing user stats, the crowd gives cheers!
An iframe loads, the numbers shine bright,
In UserProfile, metrics now delight.
ContributorProfile joins the fun too,
🐇✨ Data leaps in, all tidy and true!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between dc372ea and 7a0e33b.

📒 Files selected for processing (1)
  • src/pages/ContributorProfile/ContributorProfile.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/pages/ContributorProfile/ContributorProfile.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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

@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: 3

🧹 Nitpick comments (2)
src/components/MetricCard.tsx (1)

20-20: Consider making the height responsive.

The fixed height of 400px might not work well on all devices and screen sizes.

Consider using a responsive height approach:

-        height="400"
+        style={{ height: 'min(400px, 50vh)' }}
src/pages/UserProfile/UserProfile.tsx (1)

46-48: Consider conditional rendering for better UX.

While the MetricCard handles falsy usernames internally, it would be better to conditionally render the entire metrics section only when a username exists.

Apply this diff to improve the user experience:

-      {/* GitHub Metrics Preview */}
-      <h3 className="text-xl font-semibold mt-6 mb-2">GitHub Metrics</h3>
-      <MetricCard username={username || ""} />
+      {/* GitHub Metrics Preview */}
+      {username && (
+        <>
+          <h3 className="text-xl font-semibold mt-6 mb-2">GitHub Metrics</h3>
+          <MetricCard username={username} />
+        </>
+      )}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b59fd71 and 2a37603.

📒 Files selected for processing (2)
  • src/components/MetricCard.tsx (1 hunks)
  • src/pages/UserProfile/UserProfile.tsx (2 hunks)
🔇 Additional comments (4)
src/components/MetricCard.tsx (2)

1-5: Component structure looks good.

The TypeScript interface and component setup follow React best practices.


10-10: Good defensive programming with early return.

The null check prevents unnecessary rendering when username is not provided.

src/pages/UserProfile/UserProfile.tsx (2)

3-3: Clean import statement.

The MetricCard import follows the established import pattern in the file.


46-50: Good integration and section placement.

The GitHub Metrics section is well-positioned above the Pull Requests section, providing a logical flow for the user profile information.


if (!username) return null;

const metricsURL = `https://metrics.lecoq.io/${username}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the external service URL and add input validation.

The metrics.lecoq.io service URL construction should be validated for security. Consider sanitizing the username input to prevent potential issues.


🏁 Script executed:

#!/bin/bash
# Description: Verify the metrics.lecoq.io service is legitimate and check for any security considerations
# Expected: Service should be accessible and legitimate

# Check if the service responds properly
curl -I "https://metrics.lecoq.io/" 2>/dev/null | head -1

# Check if a sample metrics page loads
curl -I "https://metrics.lecoq.io/octocat" 2>/dev/null | head -1

Length of output: 123


Sanitize username in metrics URL and handle service errors

To prevent URL injection and ensure robustness when metrics.lecoq.io returns errors:

  • In src/components/MetricCard.tsx (line 12), wrap the username in encodeURIComponent:
  • const metricsURL = https://metrics.lecoq.io/${username};
  • const metricsURL = https://metrics.lecoq.io/${encodeURIComponent(username)};
  • Add client-side validation (e.g., propTypes, a regex or a validation library) to allow only expected characters, such as alphanumerics, hyphens, and underscores:
    const isValidUsername = /^[A-Za-z0-9_-]+$/.test(username);
    if (!isValidUsername) {
      // show an error message or fallback UI
    }
  • Gracefully handle non-200 responses when fetching metrics (e.g., show a “Metrics unavailable” state on 4xx/5xx).

This ensures the URL can’t be tampered with and the UI degrades cleanly if the service errors.

🤖 Prompt for AI Agents
In src/components/MetricCard.tsx at line 12, sanitize the username by wrapping
it with encodeURIComponent when constructing the metricsURL to prevent URL
injection. Add client-side validation for the username prop using a regex that
allows only alphanumeric characters, hyphens, and underscores; if validation
fails, display an error message or fallback UI. Additionally, update the metrics
fetching logic to handle non-200 HTTP responses gracefully by showing a "Metrics
unavailable" state when the service returns errors.

Comment on lines +17 to +26
<iframe
src={metricsURL}
width="100%"
height="400"
frameBorder="0"
title="GitHub Metrics"
className="rounded-lg shadow-md"
onLoad={() => setLoading(false)}
></iframe>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add accessibility improvements.

The iframe should have better accessibility support for screen readers and keyboard navigation.

Apply this diff to improve accessibility:

       <iframe
         src={metricsURL}
         width="100%"
         height="400"
         frameBorder="0"
-        title="GitHub Metrics"
+        title={`GitHub Metrics for ${username}`}
         className="rounded-lg shadow-md"
         onLoad={() => setLoading(false)}
+        role="img"
+        aria-label={`GitHub statistics and metrics for user ${username}`}
       ></iframe>
📝 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
<iframe
src={metricsURL}
width="100%"
height="400"
frameBorder="0"
title="GitHub Metrics"
className="rounded-lg shadow-md"
onLoad={() => setLoading(false)}
></iframe>
</div>
<iframe
src={metricsURL}
width="100%"
height="400"
frameBorder="0"
title={`GitHub Metrics for ${username}`}
className="rounded-lg shadow-md"
onLoad={() => setLoading(false)}
role="img"
aria-label={`GitHub statistics and metrics for user ${username}`}
></iframe>
</div>
🤖 Prompt for AI Agents
In src/components/MetricCard.tsx around lines 17 to 26, the iframe lacks
accessibility features for screen readers and keyboard users. Add a meaningful
aria-label attribute to the iframe describing its content, and ensure the title
attribute is descriptive and unique. This will improve screen reader support and
keyboard navigation for the iframe element.

🛠️ Refactor suggestion

Add security attributes and improve error handling for the iframe.

The iframe lacks important security attributes and error handling mechanisms.

Apply this diff to enhance security and error handling:

+  const [error, setError] = useState(false);
+
   return (
     <div className="w-full flex flex-col items-center p-4">
       {loading && <p className="text-gray-500 mb-2">Loading metrics...</p>}
+      {error && <p className="text-red-500 mb-2">Failed to load metrics. Please try again later.</p>}
+      {!error && (
         <iframe
           src={metricsURL}
           width="100%"
           height="400"
           frameBorder="0"
           title="GitHub Metrics"
           className="rounded-lg shadow-md"
           onLoad={() => setLoading(false)}
+          onError={() => {
+            setLoading(false);
+            setError(true);
+          }}
+          sandbox="allow-scripts allow-same-origin"
+          loading="lazy"
         ></iframe>
+      )}
     </div>
   );
📝 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
<iframe
src={metricsURL}
width="100%"
height="400"
frameBorder="0"
title="GitHub Metrics"
className="rounded-lg shadow-md"
onLoad={() => setLoading(false)}
></iframe>
</div>
const [error, setError] = useState(false);
return (
<div className="w-full flex flex-col items-center p-4">
{loading && <p className="text-gray-500 mb-2">Loading metrics...</p>}
{error && <p className="text-red-500 mb-2">Failed to load metrics. Please try again later.</p>}
{!error && (
<iframe
src={metricsURL}
width="100%"
height="400"
frameBorder="0"
title="GitHub Metrics"
className="rounded-lg shadow-md"
onLoad={() => setLoading(false)}
onError={() => {
setLoading(false);
setError(true);
}}
sandbox="allow-scripts allow-same-origin"
loading="lazy"
></iframe>
)}
</div>
);
🤖 Prompt for AI Agents
In src/components/MetricCard.tsx around lines 17 to 26, the iframe element is
missing key security attributes like sandbox and allow attributes to restrict
its capabilities, and it lacks error handling for load failures. Add appropriate
sandbox attributes to limit iframe permissions, include the allow attribute if
needed, and implement an onError handler to manage loading errors gracefully,
such as setting an error state or displaying a fallback UI.

Copy link
Contributor

@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: 4

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2a37603 and dc372ea.

📒 Files selected for processing (2)
  • src/components/MetricCard.tsx (1 hunks)
  • src/pages/UserProfile/UserProfile.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/MetricCard.tsx
🔇 Additional comments (3)
src/pages/UserProfile/UserProfile.tsx (3)

1-9: LGTM!

The imports are appropriate and the PR type definition covers the essential properties used in the component.


34-34: LGTM!

The loading state handling is appropriate and user-friendly.


46-49: Remove extra blank line before the next section

The GitHub Metrics section is solid—MetricCard returns null when username is empty, so the username || "" fallback is handled gracefully.

• File: src/pages/UserProfile/UserProfile.tsx (around lines 46–49)
Drop the stray blank line between the Metrics and Pull Requests headings for cleaner formatting:

       <h3 className="text-xl font-semibold mt-6 mb-2">GitHub Metrics</h3>
       <MetricCard username={username || ""} />
-
       <h3 className="text-xl font-semibold mt-6 mb-2">Pull Requests</h3>


export default function UserProfile() {
const { username } = useParams();
const [profile, setProfile] = useState<any>(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace any type with a proper interface for better type safety.

Using any for the profile state reduces type safety and makes the code prone to runtime errors.

Define a proper interface for the GitHub user profile:

+type GitHubUser = {
+  avatar_url: string;
+  login: string;
+  bio?: string;
+  // Add other properties as needed
+};
+
-  const [profile, setProfile] = useState<any>(null);
+  const [profile, setProfile] = useState<GitHubUser | null>(null);
🤖 Prompt for AI Agents
In src/pages/UserProfile/UserProfile.tsx at line 13, replace the useState type
from 'any' to a properly defined interface representing the GitHub user profile.
Define an interface that includes the expected properties of the profile object,
then use this interface as the generic type parameter in useState to improve
type safety and prevent runtime errors.

Comment on lines 17 to 32
useEffect(() => {
async function fetchData() {
if (!username) return;

const userRes = await fetch(`https://api.github.com/users/${username}`);
const userData = await userRes.json();
setProfile(userData);

const prsRes = await fetch(`https://api.github.com/search/issues?q=author:${username}+type:pr`);
const prsData = await prsRes.json();
setPRs(prsData.items);
setLoading(false);
}

fetchData();
}, [username]);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add comprehensive error handling for API requests.

The data fetching logic lacks error handling, which could cause the component to break when API requests fail or when rate limits are exceeded.

Apply this diff to add proper error handling:

  useEffect(() => {
    async function fetchData() {
      if (!username) return;

+      try {
        const userRes = await fetch(`https://api.github.com/users/${username}`);
+        if (!userRes.ok) {
+          throw new Error(`Failed to fetch user: ${userRes.status}`);
+        }
        const userData = await userRes.json();
        setProfile(userData);

        const prsRes = await fetch(`https://api.github.com/search/issues?q=author:${username}+type:pr`);
+        if (!prsRes.ok) {
+          throw new Error(`Failed to fetch PRs: ${prsRes.status}`);
+        }
        const prsData = await prsRes.json();
        setPRs(prsData.items);
+      } catch (error) {
+        console.error('Error fetching data:', error);
+        // Consider adding error state to display user-friendly error messages
+      } finally {
        setLoading(false);
+      }
    }

    fetchData();
  }, [username]);
📝 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
useEffect(() => {
async function fetchData() {
if (!username) return;
const userRes = await fetch(`https://api.github.com/users/${username}`);
const userData = await userRes.json();
setProfile(userData);
const prsRes = await fetch(`https://api.github.com/search/issues?q=author:${username}+type:pr`);
const prsData = await prsRes.json();
setPRs(prsData.items);
setLoading(false);
}
fetchData();
}, [username]);
useEffect(() => {
async function fetchData() {
if (!username) return;
try {
const userRes = await fetch(`https://api.github.com/users/${username}`);
if (!userRes.ok) {
throw new Error(`Failed to fetch user: ${userRes.status}`);
}
const userData = await userRes.json();
setProfile(userData);
const prsRes = await fetch(
`https://api.github.com/search/issues?q=author:${username}+type:pr`
);
if (!prsRes.ok) {
throw new Error(`Failed to fetch PRs: ${prsRes.status}`);
}
const prsData = await prsRes.json();
setPRs(prsData.items);
} catch (error) {
console.error('Error fetching data:', error);
// Consider adding error state to display a user-friendly message
} finally {
setLoading(false);
}
}
fetchData();
}, [username]);
🤖 Prompt for AI Agents
In src/pages/UserProfile/UserProfile.tsx around lines 17 to 32, the fetchData
function lacks error handling for the API requests, which can cause the
component to break if requests fail or rate limits are exceeded. Wrap the entire
fetchData logic in a try-catch block, handle any errors by setting an error
state or logging the error, and ensure setLoading(false) is called in a finally
block to update the loading state regardless of success or failure.

<div className="max-w-3xl mx-auto mt-10 p-4 bg-white shadow-xl rounded-xl">
{profile && (
<div className="text-center">
<img src={profile.avatar_url} className="w-24 h-24 mx-auto rounded-full" />
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add alt attribute for accessibility.

The image element is missing an alt attribute, which is important for accessibility and SEO.

Apply this diff to add the alt attribute:

-          <img src={profile.avatar_url} className="w-24 h-24 mx-auto rounded-full" />
+          <img src={profile.avatar_url} alt={`${profile.login}'s avatar`} className="w-24 h-24 mx-auto rounded-full" />
📝 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
<img src={profile.avatar_url} className="w-24 h-24 mx-auto rounded-full" />
<img
src={profile.avatar_url}
alt={`${profile.login}'s avatar`}
className="w-24 h-24 mx-auto rounded-full"
/>
🤖 Prompt for AI Agents
In src/pages/UserProfile/UserProfile.tsx at line 40, the img element lacks an
alt attribute, which is essential for accessibility and SEO. Add an alt
attribute to the img tag, ideally using a descriptive text such as the user's
name or a generic description like "User avatar" to improve screen reader
support and SEO.

Comment on lines 53 to 58
{prs.map((pr, i) => (
<li key={i}>
<a href={pr.html_url} target="_blank" className="text-blue-600 hover:underline">
{pr.title}
</a>
</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Improve list key and add security attributes for external links.

Two improvements needed for better React practices and security:

  1. Using array index as key is not ideal for React lists
  2. External links should include security attributes

Apply this diff to address these issues:

        {prs.map((pr, i) => (
-          <li key={i}>
-            <a href={pr.html_url} target="_blank" className="text-blue-600 hover:underline">
+          <li key={pr.html_url}>
+            <a href={pr.html_url} target="_blank" rel="noopener noreferrer" className="text-blue-600 hover:underline">
              {pr.title}
            </a>
          </li>
📝 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
{prs.map((pr, i) => (
<li key={i}>
<a href={pr.html_url} target="_blank" className="text-blue-600 hover:underline">
{pr.title}
</a>
</li>
{prs.map((pr, i) => (
<li key={pr.html_url}>
<a
href={pr.html_url}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline"
>
{pr.title}
</a>
</li>
🤖 Prompt for AI Agents
In src/pages/UserProfile/UserProfile.tsx around lines 53 to 58, replace the
array index used as the key in the list items with a unique and stable
identifier from the pr object, such as pr.id. Additionally, add rel="noopener
noreferrer" to the anchor tags that open external links with target="_blank" to
improve security and prevent potential vulnerabilities.

@mehul-m-prajapati
Copy link
Collaborator

@itschetna : Looks like API https://metrics.lecoq.io/ is not working. Need to find some alternative

@itschetna
Copy link
Contributor Author

@itschetna : Looks like API https://metrics.lecoq.io/ is not working. Need to find some alternative

Hi @mehul-m-prajapati,
Thanks for pointing that out! I'm currently exploring alternative solutions to replace the metrics API Will update you shortly once I finalize and test the improved version.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Add metrics preview of a user

2 participants