Skip to content

Commit 1196613

Browse files
committed
refact: qr scan 페이지 디자인 수정
1 parent 13bf747 commit 1196613

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

src/features/ticket/ui/QrScanner.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useEffect, useRef, useState } from "react";
22
import QrScanner from "qr-scanner";
33
import { useTicketQrCodeValidate } from "../hooks/useOrderHook";
4+
import Button from "../../../../design-system/ui/Button";
45

56
const QrScannerComponent = () => {
67
const videoRef = useRef<HTMLVideoElement>(null);
@@ -71,24 +72,13 @@ const QrScannerComponent = () => {
7172

7273
return (
7374
<div className="p-4">
74-
<h2 className="text-xl font-bold mb-2">QR 코드 스캔</h2>
7575
<video
7676
ref={videoRef}
7777
className="border rounded w-full max-w-md"
78-
style={{ aspectRatio: "4 / 3" }}
78+
style={{ aspectRatio: "3 / 4" }}
7979
/>
8080
{!isScanning && (
81-
<button
82-
onClick={handleStartScan}
83-
className="mt-4 px-4 py-2 bg-blue-600 text-white rounded"
84-
>
85-
스캔 시작
86-
</button>
87-
)}
88-
{scanResult && (
89-
<p className="mt-4 text-green-700 font-semibold">
90-
스캔 완료
91-
</p>
81+
<Button label="스캔하기" onClick={handleStartScan} className="w-full h-12 rounded-full mt-10 px-4 py-2" />
9282
)}
9383
</div>
9484
);

src/pages/dashboard/ui/ticket/CheckInPage.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import QrScannerComponent from "../../../../features/ticket/ui/QrScanner";
2+
import DashboardLayout from "../../../../shared/ui/backgrounds/DashboardLayout";
23

34
const CheckInPage = () => {
45
return (
5-
<div className="max-w-screen-md mx-auto">
6-
<h1 className="text-2xl font-bold mb-4">체크인 스캐너</h1>
7-
<QrScannerComponent />
8-
</div>
6+
<DashboardLayout centerContent="WOOACON 2024">
7+
<div className='flex flex-col gap-2 mt-8 px-7'>
8+
<h1 className="w-full text-center font-bold text-xl">QR 코드 스캔</h1>
9+
<div className="max-w-screen-md mx-auto">
10+
<QrScannerComponent />
11+
</div>
12+
</div>
13+
</DashboardLayout>
14+
915
);
1016
};
1117

0 commit comments

Comments
 (0)