Skip to content

Commit

Permalink
fix : qr코드 여러개일때 색상 초기화 안되는 문제
Browse files Browse the repository at this point in the history
  • Loading branch information
9yujin committed Sep 21, 2023
1 parent 2ad293e commit 07f78f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions apps/ticket/src/components/mypage/Ticket/QrCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ const Qrcode = ({
qrCode.update({
data: uuid,
});

if (status !== '입장 전') {
qrCode.update({
cornersDotOptions: { color: '#e3e4e8' },
cornersSquareOptions: { color: '#e3e4e8' },
dotsOptions: { color: '#e3e4e8' },
});
}

return () =>
qrCode.update({
cornersDotOptions: { color: 'black' },
cornersSquareOptions: { color: 'black' },
dotsOptions: { color: 'black' },
});
}, [uuid, status]);

const handleReload = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ const QrSheetContainer = ({
{title}
</Text>
<QrWrapper
status={data?.issuedTicketInfo.issuedTicketStatus === '입장 전'}
status={
data
? data.issuedTicketInfo.issuedTicketStatus === '입장 전'
: ticket.issuedTicketStatus === '입장 전'
}
>
<QrContainer>
{/* <StatusIndicator
Expand Down

0 comments on commit 07f78f9

Please sign in to comment.