diff --git a/src/api/announcements.js b/src/api/announcements.js index 85ca033..6eae046 100644 --- a/src/api/announcements.js +++ b/src/api/announcements.js @@ -1,39 +1,5 @@ import { apiFetch } from './client'; -// TODO: 백엔드 연동 시 mock 제거 -const USE_MOCK = true; - -const MOCK_DATA = [ - { - id: 1, - title: '오픈 베타 테스트 안내', - content: '2월 28일부터 오픈 베타 테스트가 시작됩니다. 많은 참여 부탁드립니다.', - createdAt: '2026-02-24', - }, - { - id: 2, - title: '클라이언트 v0.2.0 업데이트', - content: '멀티플레이어 매칭 시스템이 개선되었습니다. 런처를 통해 업데이트해주세요.', - createdAt: '2026-02-20', - }, - { - id: 3, - title: '서버 점검 안내 (2/18)', - content: '2월 18일 02:00 ~ 06:00 서버 점검이 진행됩니다.', - createdAt: '2026-02-17', - }, - { - id: 4, - title: '테스터 모집 공고', - content: '신규 테스터를 모집합니다. 관심 있으신 분은 신청해주세요.', - createdAt: '2026-02-10', - }, -]; - export async function getAnnouncements() { - if (USE_MOCK) { - await new Promise((r) => setTimeout(r, 300)); - return MOCK_DATA; - } return apiFetch('/api/announcements'); } diff --git a/src/api/auth.js b/src/api/auth.js index 0276a96..0d1e612 100644 --- a/src/api/auth.js +++ b/src/api/auth.js @@ -1,14 +1,6 @@ import { apiFetch } from './client'; -// TODO: 백엔드 연동 시 mock 제거 -const USE_MOCK = true; - export async function login(username, password) { - if (USE_MOCK) { - await new Promise((r) => setTimeout(r, 500)); - if (!username || !password) throw new Error('아이디와 비밀번호를 입력해주세요.'); - return { token: 'mock-jwt-token', username }; - } return apiFetch('/api/auth/login', { method: 'POST', body: JSON.stringify({ username, password }), diff --git a/src/api/download.js b/src/api/download.js index 6fff175..700d494 100644 --- a/src/api/download.js +++ b/src/api/download.js @@ -1,17 +1,5 @@ import { apiFetch } from './client'; -// TODO: 백엔드 연동 시 mock 제거 -const USE_MOCK = true; - export async function getDownloadInfo() { - if (USE_MOCK) { - await new Promise((r) => setTimeout(r, 200)); - return { - url: '#', - version: 'v0.2.0', - fileSize: '1.2 GB', - fileName: 'A301_Launcher_Setup.exe', - }; - } return apiFetch('/api/download/info'); } diff --git a/src/components/AnnouncementBoard.jsx b/src/components/AnnouncementBoard.jsx index c56e1ab..d583327 100644 --- a/src/components/AnnouncementBoard.jsx +++ b/src/components/AnnouncementBoard.jsx @@ -21,7 +21,7 @@ export default function AnnouncementBoard() { onClick={() => setExpanded(expanded === item.id ? null : item.id)} > {item.title} - {item.createdAt} + {item.createdAt?.slice(0, 10)} {expanded === item.id && (
{item.content}