diff --git a/src/components/FileContributors.tsx b/src/components/FileContributors.tsx index 0d265b85f1f..473d211147d 100644 --- a/src/components/FileContributors.tsx +++ b/src/components/FileContributors.tsx @@ -1,5 +1,4 @@ import { BaseHTMLAttributes, useState } from "react" -import { Avatar } from "@chakra-ui/react" import type { ChildOnlyProp, FileContributor } from "@/lib/types" @@ -12,6 +11,7 @@ import { ScrollArea } from "@/components/ui/scroll-area" import { trackCustomEvent } from "@/lib/utils/matomo" +import { Avatar } from "./ui/avatar" import Modal from "./ui/dialog-modal" import { useBreakpointValue } from "@/hooks/useBreakpointValue" @@ -22,19 +22,27 @@ const ContributorList = ({ children }: Required) => ( ) +const ContributorAvatar = ({ + contributor, + label, +}: ContributorProps & { label?: string }) => ( + +) + type ContributorProps = { contributor: FileContributor } const Contributor = ({ contributor }: ContributorProps) => ( - - - @{contributor.login} - ) @@ -84,13 +92,7 @@ const FileContributors = ({ - +

:{" "} diff --git a/src/components/IssuesList/index.tsx b/src/components/IssuesList/index.tsx index ff7091bbbe3..e994dbdf53e 100644 --- a/src/components/IssuesList/index.tsx +++ b/src/components/IssuesList/index.tsx @@ -1,6 +1,5 @@ import Emoji from "react-emoji-render" import { - Avatar, Flex, HStack, SimpleGrid, @@ -13,6 +12,7 @@ import type { GHIssue } from "@/lib/types" import InlineLink from "../Link" import Tag from "../Tag" +import { Avatar } from "../ui/avatar" type IssuesListProps = SimpleGridProps & { issues: GHIssue[] @@ -35,8 +35,8 @@ const IssuesList = ({ issues, ...props }: IssuesListProps) => { by {issue.user.login} diff --git a/src/components/Leaderboard.tsx b/src/components/Leaderboard.tsx index d7b6c698069..764801fe8f8 100644 --- a/src/components/Leaderboard.tsx +++ b/src/components/Leaderboard.tsx @@ -1,6 +1,5 @@ import { useTranslation } from "next-i18next" import { - Avatar, Box, Flex, LinkBox, @@ -16,6 +15,8 @@ import { BaseLink } from "@/components/Link" import { GITHUB_URL } from "@/lib/constants" +import { Avatar } from "./ui/avatar" + import { useRtlFlip } from "@/hooks/useRtlFlip" type Person = { @@ -95,10 +96,10 @@ const Leaderboard = ({ content, limit = 100 }: LeaderboardProps) => {