Skip to content

Commit de47794

Browse files
committed
refact: QRcord 연결
1 parent 0336a13 commit de47794

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

design-system/ui/modals/QrModal.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import qr_check from '../../icons/QrCheck.svg';
1010
interface QrModalProps {
1111
isChecked: boolean; // QR 상태
1212
iconPath1?: React.ReactElement; // 모달 배경 이미지
13-
iconPath2?: React.ReactElement; // QR 이미지
13+
ticketQrCode: string;
1414
className?: string;
1515
title: string; // 이벤트명
1616
hostName: string; // 주최명
@@ -28,7 +28,7 @@ interface QrModalProps {
2828
const QrModal = ({
2929
isChecked,
3030
iconPath1,
31-
iconPath2,
31+
ticketQrCode,
3232
className,
3333
title,
3434
hostName,
@@ -56,7 +56,9 @@ const QrModal = ({
5656
<div className={`${flexColumnCenter} h-screen ${className}`}>
5757
<div>
5858
{iconPath1 && <div className="w-full">{iconPath1}</div>}
59-
{iconPath2 && <div className={`ml-[8%] -mt-[176%] ${isChecked ? '' : 'opacity-50'}`}>{iconPath2}</div>}
59+
<div className={`ml-[5%] -mt-[180%] ${isChecked ? '' : 'opacity-50'}`}>
60+
<img src={`data:image/png;base64,${ticketQrCode}`} alt="QR Code" className="w-60 h-60" />
61+
</div>
6062
<div className={`${flexColumn} justify-start px-6 ${isChecked ? '' : 'opacity-50'}`}>
6163
<div className={`${flexRowSpaceBetweenCenter} w-full mt-[22%]`}>
6264
<h1 className="truncate max-w-48 mr-2 font-semibold">{title}</h1>

src/pages/menu/ui/MyTicketPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import TicketLogo from '../../../../public/assets/menu/TicketLogo.svg';
33
import { useEffect, useState } from 'react';
44
import QrModal from '../../../../design-system/ui/modals/QrModal';
55
import QRbackground from '../../../../design-system/icons/QRbackground.svg';
6-
import QRcode from '../../../../design-system/icons/QrCode.svg';
76
import EventCard from '../../../shared/ui/EventCard';
87
import { readMyTickets } from '../../../features/ticket/api/order';
98
import completedImg from '../../../../public/assets/menu/Completed.svg';
@@ -86,7 +85,7 @@ const MyTicketPage = () => {
8685
<QrModal
8786
isChecked={true}
8887
iconPath1={<img src={QRbackground} alt="QRbackground" />}
89-
iconPath2={<img src={QRcode} alt="QRcode" />}
88+
ticketQrCode = {selectedTicket.ticketQrCode}
9089
title={selectedTicket.title}
9190
hostName={selectedTicket.hostChannelName}
9291
date={selectedTicket.startDate}

0 commit comments

Comments
 (0)