diff --git a/frontend/package.json b/frontend/package.json index 63bac28..45a8aad 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "piroinfront", - "proxy": "http://13.209.73.127:8080", + "proxy": "http://localhost:8080", "version": "0.1.0", "private": true, "dependencies": { diff --git a/frontend/src/pages/pirocheck/attendance/Attendance.js b/frontend/src/pages/pirocheck/attendance/Attendance.js index 5119587..30c20b0 100644 --- a/frontend/src/pages/pirocheck/attendance/Attendance.js +++ b/frontend/src/pages/pirocheck/attendance/Attendance.js @@ -48,13 +48,13 @@ function AdminView() { const handleGenerate = async () => { const res = await authFetch('/api/admin/attendance/start', { method: 'POST' }); const data = await res.json(); - setCode(data.code); - if (data.isSuccess) { - setCode(data.result.code); + + if (res.ok && data.code) { + setCode(data.code); setHasCode(true); setMessage(''); } else { - setMessage(data.message); + setMessage(data.message || '코드 생성 실패'); } }; diff --git a/frontend/src/pages/pirocheck/attendance/Attendance.module.css b/frontend/src/pages/pirocheck/attendance/Attendance.module.css index 6368969..950200b 100644 --- a/frontend/src/pages/pirocheck/attendance/Attendance.module.css +++ b/frontend/src/pages/pirocheck/attendance/Attendance.module.css @@ -87,27 +87,28 @@ align-items: center; background: var(--gray600); border-radius: 10px; - overflow: hidden; width: 480px; max-width: calc(100vw - 56px); margin-bottom: 16px; - padding: 3px 3px 3px 20px; + padding: 3px; box-sizing: border-box; } .codeInput { flex: 1; + min-width: 0; background: transparent; border: none; outline: none; color: var(--white); font-family: var(--font-main); font-size: 1rem; + padding-left: 20px; } - .codeInput::placeholder { color: var(--gray200); } .submitBtn { + flex-shrink: 0; padding: 10px 20px; background: var(--dark); border: none; @@ -211,6 +212,10 @@ width: calc(100vw - 56px); } + .codeInput { + font-size: 85%; + } + .cloverSvg { width: 63px; height: 63px; @@ -227,4 +232,8 @@ padding: 24px 28px; box-sizing: border-box; } + + .submitBtn { + flex-shrink: 0; + } } \ No newline at end of file