diff --git a/src/Menu/page.tsx b/src/Menu/page.tsx index 0f5cebf..da199af 100644 --- a/src/Menu/page.tsx +++ b/src/Menu/page.tsx @@ -1,7 +1,16 @@ import UserListItemCard from "@/common/components/UserListItemCard"; +import UserProfileAvatar from "@/common/components/UserProfileAvatar"; import { css } from "@emotion/react"; import styled from "@emotion/styled"; -import { Blockquote, Card, Checkbox, Flex, Heading, Radio, Text } from "@radix-ui/themes"; +import { + Blockquote, + Card, + Checkbox, + Flex, + Heading, + Radio, + Text, +} from "@radix-ui/themes"; import { version } from "react"; import { Link } from "react-router"; @@ -10,6 +19,7 @@ export default function MenuPage() { <> {version} menu + heading @@ -50,6 +60,10 @@ export default function MenuPage() { 유저4 + + {/* fallback이 보여지는 케이스 -> 이미지 로딩 실패시 */} + + ); } diff --git a/src/common/components/UserProfileAvatar.tsx b/src/common/components/UserProfileAvatar.tsx new file mode 100644 index 0000000..366f30e --- /dev/null +++ b/src/common/components/UserProfileAvatar.tsx @@ -0,0 +1,20 @@ +import { Avatar, type AvatarProps } from "@radix-ui/themes"; + +type UserProfileAvatarProps = Omit< + AvatarProps, + "radius" | "variant" | "color" | "fallback" +>; + +const UserProfileAvatar = (props: UserProfileAvatarProps) => { + return ( + fallback image} + {...props} + /> + ); +}; + +export default UserProfileAvatar;