Skip to content

Commit

Permalink
fix : 멘토 사진 출력 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoiSangwon committed Jun 12, 2024
1 parent d4cf2d7 commit e1f76bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/pages/main/main.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,19 @@ export const ImageButton = styled.img`
border: none;
cursor: pointer;
`;
export const ProfileCircle = styled.div`
interface ProfileCircleProps {
imageUrl: string;
}

export const ProfileCircle = styled.div<ProfileCircleProps>`
width: 196px;
height: 196px;
background-color: white;
border-radius: 50%;
flex: none;
background-image: url(${(props) => props.imageUrl});
`;

export const ProfileTopContainer = styled.div`
display: flex;
flex-direction: row;
Expand Down
8 changes: 7 additions & 1 deletion src/pages/main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@ function Main() {
alt="Left"
onClick={handlePrevClick}
/>
<styles.ProfileCircle />
<styles.ProfileCircle
imageUrl={
mentorData !== null
? mentorData[currentIndex].mentorName
: "https://picsum.photos/250/250"
}
/>
<styles.ImageButton
src={RightButton}
alt="Right"
Expand Down

0 comments on commit e1f76bf

Please sign in to comment.