-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c14b07b
commit d054140
Showing
19 changed files
with
808 additions
and
706 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
import * as S from './DetailContent.style' | ||
import { ReactComponent as ProfileImg } from '../../assets/ProductDetailPage/profile.svg' | ||
import * as S from './DetailContent.style'; | ||
import { ReactComponent as ProfileImg } from '../../assets/ProductDetailPage/profile.svg'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
interface ProductProps { | ||
userId: number; | ||
userName: string; | ||
title: string; | ||
price: number; | ||
material: string; | ||
period: number; | ||
bio: string; | ||
userId: number; | ||
userName: string; | ||
profileImg: string; | ||
title: string; | ||
price: number; | ||
material: string; | ||
period: number; | ||
bio: string; | ||
} | ||
|
||
const DetailContent = ({userId, userName, title, price, material, period, bio}: ProductProps) => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<S.Container> | ||
<S.ProfileWrapper onClick={ () => navigate(`/profile/${userId}`)}> | ||
<ProfileImg /> | ||
<S.UserName>{userName}</S.UserName> | ||
</S.ProfileWrapper> | ||
<S.Title>{title}</S.Title> | ||
<S.Price>{price.toLocaleString()}원</S.Price> | ||
<S.Info>필요한 재료 | {material}</S.Info> | ||
<S.Info>예상 제작 기간 | 평균 {period}일</S.Info> | ||
<S.Bio>{bio}</S.Bio> | ||
</S.Container> | ||
); | ||
const DetailContent = ({ | ||
userId, | ||
userName, | ||
profileImg, | ||
title, | ||
price, | ||
material, | ||
period, | ||
bio, | ||
}: ProductProps) => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<S.Container> | ||
<S.ProfileWrapper onClick={() => navigate(`/profile/${userId}`)}> | ||
<S.ProfileImg src={profileImg} /> | ||
<S.UserName>{userName}</S.UserName> | ||
</S.ProfileWrapper> | ||
<S.Title>{title}</S.Title> | ||
<S.Price>{price.toLocaleString()}원</S.Price> | ||
<S.Info>필요한 재료 | {material}</S.Info> | ||
<S.Info>예상 제작 기간 | 평균 {period}일</S.Info> | ||
<S.Bio>{bio}</S.Bio> | ||
</S.Container> | ||
); | ||
}; | ||
|
||
export default DetailContent; |
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.