+
{
{item.comment_num}
- {data && (
- //
展示头像
-
-
-
- )}
+
+
+
>
)
diff --git a/moon/apps/web/components/Issues/MemberHoverAvatarList.tsx b/moon/apps/web/components/Issues/MemberHoverAvatarList.tsx
new file mode 100644
index 000000000..68e81899b
--- /dev/null
+++ b/moon/apps/web/components/Issues/MemberHoverAvatarList.tsx
@@ -0,0 +1,80 @@
+import React from 'react'
+import { Avatar, AvatarStack } from '@primer/react'
+import { useQueries } from '@tanstack/react-query'
+
+import { OrganizationMember } from '@gitmono/types/generated'
+
+import { useScope } from '@/contexts/scope'
+import { apiClient } from '@/utils/queryClient'
+
+import { ItemsType } from './IssuesContent'
+import { MemberHovercard } from './MemberHoverCardNE'
+
+export const MemberHoverAvatarList = ({ users }: { users: ItemsType[number] }) => {
+ const shouldFetch = users.assignees.length > 0
+ const query = apiClient.organizations.getMembersByUsername()
+
+ const { scope } = useScope()
+
+ const queries = useQueries({
+ queries: users.assignees.map((u) => ({
+ queryKey: query.requestKey(`${scope}`, `${u}`),
+ queryFn: () => query.request(`${scope}`, `${u}`),
+ enabled: shouldFetch
+ })),
+ combine: (res) => {
+ return {
+ data: res.map((r) => r.data),
+ pending: res.some((r) => r.isPending)
+ }
+ }
+ })
+
+ return (
+ <>
+
+ {queries.pending
+ ? Array.from({ length: users.assignees.length }).map((_, i) => (
+ // eslint-disable-next-line react/no-array-index-key
+
+ ))
+ : queries.data.map(
+ (q) =>
+ q && (
+
+ )
+ )}
+
+ >
+ )
+}
+
+interface HoverProps {
+ username: string
+ userData: OrganizationMember
+}
+const AvatarwithHover = ({
+ src,
+ hoverProps,
+ className,
+ style
+}: {
+ src: string
+ hoverProps: HoverProps
+ className?: string
+ style?: React.CSSProperties
+}) => {
+ return (
+ <>
+
+
+
+ >
+ )
+}
diff --git a/moon/apps/web/components/Issues/MemberHoverCardNE.tsx b/moon/apps/web/components/Issues/MemberHoverCardNE.tsx
index 8a9661dd0..4c97b1f5a 100644
--- a/moon/apps/web/components/Issues/MemberHoverCardNE.tsx
+++ b/moon/apps/web/components/Issues/MemberHoverCardNE.tsx
@@ -78,9 +78,7 @@ export function MemberHovercard({
return (
-
- {children}
-
+ {children}
{open && (
@@ -102,12 +100,12 @@ export function MemberHovercard({
{member && (
- {/* these are fixed, we need fetch the data from backend in this cmp */}
+ {/* these are fixed, we need fetch the member from backend in this cmp */}
- I may be slow to respond
+ {member?.user.email}
-
+ {member && }
-
Stay foolish
-
China
-
Commit timeline
+ {/*
Stay foolish */}
+ {/*
China */}
+ {/*
Commit timeline */}
)}
@@ -136,4 +134,4 @@ export function MemberHovercard({
)
-}
\ No newline at end of file
+}