Skip to content

Commit

Permalink
fix. change product status (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
doyupK authored Dec 19, 2023
1 parent 18bd959 commit 90c80db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const MarketContents = (props: MarketContentsProps) => {
<MarketMine
id={id}
brdSeq={market.data.brdSeq as unknown as string}
price={market.data.price as unknown as number}
/>
) : (
<MarketLike id={id} isLike={market.data.isLike} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import { useQueryClient } from '@tanstack/react-query';
interface MarketMineProps {
id: string;
brdSeq: string;
price: number;
}

const MarketMine = ({ id, brdSeq }: MarketMineProps) => {
const MarketMine = ({ id, brdSeq, price }: MarketMineProps) => {
const { push } = useRouter();
const searchParams = useSearchParams();
const queryClient = useQueryClient();
Expand Down Expand Up @@ -123,9 +124,13 @@ const MarketMine = ({ id, brdSeq }: MarketMineProps) => {
<Button variant="Line" onClick={handleRemoveModal}>
<Typography color="greyScale-6">삭제</Typography>
</Button>
<Button variant="Line" onClick={handleStatusModal}>
<Typography color="greyScale-6">판매 완료</Typography>
</Button>
{price !== 1 ? (
<Button variant="Line" onClick={handleStatusModal}>
<Typography color="greyScale-6">판매 완료</Typography>
</Button>
) : (
''
)}
</Wrapper>
);
};
Expand Down

0 comments on commit 90c80db

Please sign in to comment.