diff --git a/apps/web/src/features/auth/components/AccountCard.tsx b/apps/web/src/features/auth/components/AccountCard.tsx
index 889c46a..1c62138 100644
--- a/apps/web/src/features/auth/components/AccountCard.tsx
+++ b/apps/web/src/features/auth/components/AccountCard.tsx
@@ -23,24 +23,19 @@ export function AccountCard(props: Props) {
if (!me) return null
if (isPending)
return (
-
-
-
- {props.badge}
-
+ } badge={props.badge}>
{me.handle ?? me.did}
-
+
)
const handle = me.handle ? `@${me.handle}` : me.did
const name = profile?.displayName ?? me.handle ?? me.did
return (
-
- {/* The avatar holds the badge on its corner. */}
-
-
- {props.badge}
-
+ }
+ badge={props.badge}
+ >
{name}
{profile?.displayName && (
@@ -49,6 +44,27 @@ export function AccountCard(props: Props) {
)}
+
+ )
+}
+
+interface LayoutProps {
+ did: string
+ avatar: ReactNode
+ badge?: ReactNode
+ /** The names beside the avatar. */
+ children: ReactNode
+}
+
+/** The avatar, holding the badge on its corner, beside the names, with the DID on hover. */
+function Layout(props: LayoutProps) {
+ return (
+
+
+ {props.avatar}
+ {props.badge}
+
+ {props.children}
)
}