Skip to content

Commit

Permalink
Merge pull request #289 from TripInfoWeb/dev_header
Browse files Browse the repository at this point in the history
fix: 상단 헤더 프로필 이미지 남자 이미지만 나오는 문제 수정
  • Loading branch information
ssssksss authored Sep 11, 2024
2 parents b1887ff + 058f71a commit 672b5d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import HeaderSidebarContainer from "@/containers/common/HeaderSidebarContainer";
import Image from "next/image";
import Link from "next/link";
import { MdOutlineMenu } from "react-icons/md";
import UserImage from "../auth/UserImage";
import ReactToastifyComponent from "./ReactToastifyComponent";

interface Props {
Expand All @@ -12,6 +13,8 @@ interface Props {
onClose: () => void;
logoutHandler: () => void;
userId: number;
userSex: string;
userProfile: string;
}

const Header = ({
Expand All @@ -22,6 +25,8 @@ const Header = ({
onClose,
userId,
logoutHandler,
userSex,
userProfile,
}: Props) => {
return (
<header className="flex w-full flex-row justify-center">
Expand Down Expand Up @@ -147,12 +152,10 @@ const Header = ({
href={"/mypage?mainCategory=정보&category=owner"}
className={"relative rounded-[50%]"}
>
<Image
className="rounded-full border-[0.03125rem] border-[#B8EDD9] bg-[#F2FAF7]"
src="/user_sex_man_default_image.svg"
alt="user_sex_man_default_image"
width={30}
height={30}
<UserImage
userImageAddress={`${userProfile}`}
userSex={`${userSex}`}
size={30}
/>
</Link>

Expand Down
2 changes: 2 additions & 0 deletions src/containers/common/HeaderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ const HeaderContainer = () => {
onMenuClicked={onMenuClicked}
onClose={onClose}
userId={authStore.id}
userSex={authStore.sex}
userProfile={authStore.userImage.address}
logoutHandler={logoutHandler}
/>
);
Expand Down

0 comments on commit 672b5d7

Please sign in to comment.