Skip to content

Commit

Permalink
Merge pull request #67 from bssm-portfolio/hotfix/bsm-profile
Browse files Browse the repository at this point in the history
BSM 프로필 사진 없을 경우 수정
  • Loading branch information
J1min authored Mar 8, 2023
2 parents 0e30444 + 77c11c8 commit 22c6215
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion components/app/CommentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRef, useState } from "react";
import { checkInputValueIsNull } from "@/utils/input";
import httpClient from "@/apis";
import useUser from "@/hooks/useUser";
import config from "@/config";
import Comment from "../atoms/Comment";
import InputButton from "../atoms/InputButton";

Expand Down Expand Up @@ -41,7 +42,7 @@ export default function CommentList({ portfolioId }: { portfolioId?: number }) {
<div className="bg-white mt-2 p-3 box-border rounded">
<form className="flex mt-base relative" onSubmit={handleSubmit(onValid)}>
<Image
src={userInfo.profileImageUrl}
src={userInfo.profileImageUrl || config.defaultProfile}
alt="프로필"
width={40}
height={40}
Expand Down
5 changes: 1 addition & 4 deletions components/common/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@ export default function Avatar({
className={classNames(className, "rounded-full", {
"h-[40px]": height === 40,
})}
src={imageUrl || ""}
src={imageUrl || config.defaultProfile}
alt="사용자 아바타"
width={width}
height={height}
sizes="40px"
priority
onError={(event) => {
event.currentTarget.src = config.defaultProfile;
}}
/>
);
}

0 comments on commit 22c6215

Please sign in to comment.