2026-01-21 17:04:18 +09:00
|
|
|
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|
|
|
|
import { isMobile } from "react-device-detect";
|
2026-01-21 17:07:56 +09:00
|
|
|
import { cn, getTodayKST, formatFullDate, formatXDateTime } from "@/utils";
|
|
|
|
|
import { CATEGORY_NAMES, SOCIAL_LINKS } from "@/constants";
|
2026-01-21 17:04:18 +09:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 프로미스나인 팬사이트 메인 앱
|
|
|
|
|
*
|
2026-01-21 17:07:56 +09:00
|
|
|
* Phase 2: 유틸리티 및 상수 완료
|
|
|
|
|
* - constants/index.js: 상수 정의 (카테고리, SNS 링크 등)
|
|
|
|
|
* - utils/cn.js: className 유틸리티 (clsx 기반)
|
|
|
|
|
* - utils/date.js: 날짜 관련 유틸리티
|
|
|
|
|
* - utils/format.js: 포맷팅 유틸리티
|
|
|
|
|
* - utils/index.js: 통합 export
|
2026-01-21 17:04:18 +09:00
|
|
|
*/
|
|
|
|
|
function App() {
|
2026-01-21 17:07:56 +09:00
|
|
|
const today = getTodayKST();
|
|
|
|
|
|
2026-01-21 17:04:18 +09:00
|
|
|
return (
|
|
|
|
|
<BrowserRouter>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route
|
|
|
|
|
path="/"
|
|
|
|
|
element={
|
|
|
|
|
<div className="min-h-screen flex items-center justify-center bg-gray-50">
|
2026-01-21 17:07:56 +09:00
|
|
|
<div className="text-center space-y-4">
|
2026-01-21 17:04:18 +09:00
|
|
|
<h1 className="text-2xl font-bold text-primary mb-2">
|
|
|
|
|
fromis_9 Frontend Refactoring
|
|
|
|
|
</h1>
|
|
|
|
|
<p className="text-gray-600">
|
2026-01-21 17:07:56 +09:00
|
|
|
Phase 2 완료 - 유틸리티 및 상수
|
2026-01-21 17:04:18 +09:00
|
|
|
</p>
|
2026-01-21 17:07:56 +09:00
|
|
|
<p className={cn("text-sm", isMobile ? "text-blue-500" : "text-green-500")}>
|
2026-01-21 17:04:18 +09:00
|
|
|
디바이스: {isMobile ? "모바일" : "PC"}
|
|
|
|
|
</p>
|
2026-01-21 17:07:56 +09:00
|
|
|
|
|
|
|
|
<div className="mt-6 p-4 bg-white rounded-lg shadow text-left text-sm space-y-2">
|
|
|
|
|
<p><strong>오늘 날짜:</strong> {today}</p>
|
|
|
|
|
<p><strong>포맷된 날짜:</strong> {formatFullDate(today)}</p>
|
|
|
|
|
<p><strong>X 스타일:</strong> {formatXDateTime(today, "19:00")}</p>
|
|
|
|
|
<p><strong>카테고리:</strong> {Object.values(CATEGORY_NAMES).join(", ")}</p>
|
|
|
|
|
<p><strong>SNS 개수:</strong> {Object.keys(SOCIAL_LINKS).length}개</p>
|
|
|
|
|
</div>
|
2026-01-21 17:04:18 +09:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
</Routes>
|
|
|
|
|
</BrowserRouter>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|