Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ export async function generateMetadata({
}): Promise<Metadata> {
const { username } = await params;
const title = `@${username}`;
const description = `View ${username}'s approved public profile on Dev Nepal, including the details they chose to share.`;
// Metadata is built from the URL alone, so it must not claim the profile
// exists or is approved.
const description = `Dev Nepal member profile for @${username}.`;
return {
title,
description,
openGraph: {
title: `${title} · Dev Nepal`,
description,
images: [`https://github.com/${username}.png`],
},
twitter: {
card: "summary",
title: `${title} · Dev Nepal`,
description,
images: [`https://github.com/${username}.png`],
},
};
}
Expand Down
12 changes: 4 additions & 8 deletions apps/api/src/app/(site)/[locale]/members/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,10 @@ export default function MembersPage() {
<td className="px-5 py-4">
<div className="flex items-center gap-3">
<Avatar className="size-10">
<AvatarImage
src={
member.avatarUrl ??
`https://github.com/${member.githubUsername}.png`
}
alt={member.displayName}
/>
<AvatarFallback>
{member.avatarUrl !== null ? (
<AvatarImage src={member.avatarUrl} alt={member.displayName} />
) : null}
<AvatarFallback aria-hidden>
{member.displayName.slice(0, 2).toUpperCase()}
</AvatarFallback>
</Avatar>
Expand Down
16 changes: 9 additions & 7 deletions apps/api/src/components/modules/members/member-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export function MemberCard({
className?: string;
}) {
const profileHref = localePath(locale, `/members/${member.githubUsername}`);
const avatarSrc = member.avatarUrl ?? `https://github.com/${member.githubUsername}.png`;
const skills = useMemo(
() => member.skills.map((skill) => dict.members.skillNames[skill]),
[member.skills, dict],
Expand All @@ -166,12 +165,15 @@ export function MemberCard({
<div className="flex items-center gap-3">
<Avatar size="xl">
{/* A late image fades in; Base UI skips the fade for one already cached. */}
<AvatarImage
src={avatarSrc}
alt=""
className="transition-opacity duration-200 ease-out data-starting-style:opacity-0"
/>
<AvatarFallback>{initials(member.displayName)}</AvatarFallback>
{member.avatarUrl !== null ? (
<AvatarImage
src={member.avatarUrl}
alt=""
className="transition-opacity duration-200 ease-out data-starting-style:opacity-0"
/>
) : null}
{/* The name is shown next to the avatar, so the initials are decorative. */}
<AvatarFallback aria-hidden>{initials(member.displayName)}</AvatarFallback>
<AvatarBadge className="bg-background text-primary ring-0">
<SealCheckIcon weight="fill" aria-hidden />
</AvatarBadge>
Expand Down
Loading