Skip to content

Commit

Permalink
Fix : UserProfileAvatar 스펙 수정 (fallback 이미지 추가 및 gray color 변경) (#21)
Browse files Browse the repository at this point in the history
* fix : add gray and accent color token in theme

* feat : add fallback user profile image
  • Loading branch information
Yeonseo-Jo authored Feb 6, 2025
1 parent 8f605fa commit 0c37f4e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import "@radix-ui/themes/styles.css";
import Router from "@/Router";
import { GlobalStyles } from "@/common/styles/GlobalStyles";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { Theme } from "@radix-ui/themes";
import "@radix-ui/themes/styles.css";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

const queryClient = new QueryClient();

Expand All @@ -12,7 +12,7 @@ function App() {
<QueryClientProvider client={queryClient}>
<ReactQueryDevtools initialIsOpen={false} />
<GlobalStyles />
<Theme>
<Theme accentColor="indigo" grayColor="slate">
<Router />
</Theme>
</QueryClientProvider>
Expand Down
Binary file added src/assets/images/img_default_user_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ImgUserProfile from "./img_default_user_profile.png";

export { ImgUserProfile };
3 changes: 2 additions & 1 deletion src/common/components/UserProfileAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ImgUserProfile } from "@/assets/images";
import { Avatar, type AvatarProps } from "@radix-ui/themes";

type UserProfileAvatarProps = Omit<
Expand All @@ -11,7 +12,7 @@ const UserProfileAvatar = (props: UserProfileAvatarProps) => {
radius="full"
variant="soft"
color="gray"
fallback={<>fallback image</>}
fallback={<img src={ImgUserProfile} alt="유저 프로필 이미지" />}
{...props}
/>
);
Expand Down

0 comments on commit 0c37f4e

Please sign in to comment.