Skip to content

Commit

Permalink
feat: 구매자일 경우, Header의 [더보기] 버튼이 없다 (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
aken-you committed Jun 27, 2023
1 parent 31c0df7 commit 4e92ff4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions fe/src/components/ProductDetail/ProductDetailHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ import { ICON_NAME } from '@constants/iconName';
import Icon from '@components/common/Icon';
import * as S from './style';

const ProductDetailHeader = () => {
interface ProductDetailHeaderProps {
isSeller: boolean;
}

const ProductDetailHeader = ({ isSeller }: ProductDetailHeaderProps) => {
const navigate = useNavigate();
return (
<S.Header>
<button onClick={() => navigate(-1)}>
<Icon name={ICON_NAME.CHEVRON_LEFT} />
</button>
<Icon name={ICON_NAME.ELLIPSIS} />
{isSeller && <Icon name={ICON_NAME.ELLIPSIS} />}
</S.Header>
);
};
Expand Down
2 changes: 1 addition & 1 deletion fe/src/pages/ProductDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const ProductDetail = () => {
{responseState === 'LOADING' && <div>loading</div>}
{responseState === 'SUCCESS' && postData && (
<>
<ProductDetailHeader />
<ProductDetailHeader isSeller={postData.isSeller} />
<ProductDetailMain {...postData} interestCount={interestCount} />
<ProductDetailToolBar
isInterested={isInterested}
Expand Down

0 comments on commit 4e92ff4

Please sign in to comment.