feat: add quick account switch interaction
This commit is contained in:
parent
f33c5260df
commit
ad6b8890c5
24 changed files with 217 additions and 85 deletions
|
|
@ -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)} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue