-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from ktmihs/develop
Trainer page and Trainer edit page
- Loading branch information
Showing
7 changed files
with
275 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import styled from '@emotion/styled'; | ||
import Image from 'next/image'; | ||
import profile from '@assets/common/profile.svg'; | ||
|
||
export const ImageViewer = ({ images, handleClick, len }: ImageViewerProps) => { | ||
const ImageContainer = styled.div` | ||
display: flex; | ||
gap: 10px; | ||
`; | ||
|
||
const ImageWrapper = styled.div` | ||
width: ${len}px; | ||
height: ${len}px; | ||
border-radius: 10px; | ||
background-color: #d9d9d9; | ||
cursor: pointer; | ||
overflow: hidden; | ||
`; | ||
|
||
return ( | ||
<ImageContainer> | ||
{images.length ? ( | ||
images.map((image: string, index: number) => ( | ||
<ImageWrapper key={index} id={String(index)} onClick={handleClick}> | ||
<Image src={image} alt={'강사 사진'} width={len} height={len} /> | ||
</ImageWrapper> | ||
)) | ||
) : ( | ||
<Image src={profile} alt={'이미지 없음'} width={len} height={len} /> | ||
)} | ||
</ImageContainer> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.