feat: add quick account switch interaction

This commit is contained in:
codytseng 2025-10-26 16:11:21 +08:00
parent f33c5260df
commit ad6b8890c5
24 changed files with 217 additions and 85 deletions

View file

@ -19,8 +19,8 @@ export default function Username({
skeletonClassName?: string
withoutSkeleton?: boolean
}) {
const { profile } = useFetchProfile(userId)
if (!profile && !withoutSkeleton) {
const { profile, isFetching } = useFetchProfile(userId)
if (!profile && isFetching && !withoutSkeleton) {
return (
<div className="py-1">
<Skeleton className={cn('w-16', skeletonClassName)} />
@ -63,8 +63,8 @@ export function SimpleUsername({
skeletonClassName?: string
withoutSkeleton?: boolean
}) {
const { profile } = useFetchProfile(userId)
if (!profile && !withoutSkeleton) {
const { profile, isFetching } = useFetchProfile(userId)
if (!profile && isFetching && !withoutSkeleton) {
return (
<div className="py-1">
<Skeleton className={cn('w-16', skeletonClassName)} />