feat: 대시보드 생성
This commit is contained in:
30
src/features/user/components/UserProfileSimple.tsx
Normal file
30
src/features/user/components/UserProfileSimple.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { UserProfile } from "../types";
|
||||
|
||||
interface UserProfileSimpleProps {
|
||||
user: UserProfile | null;
|
||||
isLoading: boolean;
|
||||
}
|
||||
|
||||
export const UserProfileSimple = ({ user, isLoading }: UserProfileSimpleProps) => {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="flex items-center gap-3 animate-pulse">
|
||||
<div className="h-10 w-10 rounded-full bg-slate-200" />
|
||||
<div className="h-4 w-24 rounded bg-slate-200" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!user) return null;
|
||||
|
||||
return (
|
||||
<div className="group flex items-center gap-3">
|
||||
<div className="flex h-10 w-10 items-center justify-center rounded-full border border-brand-primary/10 bg-brand-primary/20 font-bold text-brand-dark transition-colors group-hover:bg-brand-primary/30">
|
||||
{user.name[0]}
|
||||
</div>
|
||||
<span className="truncate text-sm font-bold leading-tight text-brand-dark">
|
||||
{user.name}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from "./types";
|
||||
export * from "./hooks/useUserProfile";
|
||||
export * from "./components/UserProfileCard";
|
||||
export * from "./components/UserProfileSimple";
|
||||
export * from "./api/userApi";
|
||||
|
||||
Reference in New Issue
Block a user