Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 기본 텍스트는 LF로 통일
* text=auto eol=lf

# 만약 Windows용 배치파일은 예외
*.bat text eol=crlf
*.cmd text eol=crlf
16 changes: 13 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
import { Routes, Route } from 'react-router-dom'
import { Routes, Route, Navigate } from 'react-router-dom'
import Header from './components/layout/Header'
import Footer from './components/layout/Footer'
import CommunityDetailPage from './pages/community/CommunityDetailPage'
import CommunityListPage from './pages/community/CommunityListPage'
import CommunityCreatePage from './pages/community/CommunityCreatePage'
import CommunityEditPage from './pages/community/CommunityEditPage'

export default function App() {
return (
<div className="flex min-h-screen flex-col">
<Header />
<main className="flex-1 pt-[96px]">
<Routes>
{/* 루트 접근 시 커뮤니티 목록으로 */}
<Route path="/" element={<Navigate to="/community" replace />} />

{/* 커뮤니티 */}
<Route path="/community" element={<CommunityListPage />} />
<Route path="/community/new" element={<CommunityCreatePage />} />
<Route
path="/community/:postId"
element={<CommunityDetailPage />}
path="/community/:postId/edit"
element={<CommunityEditPage />}
/>
<Route path="/community/:postId" element={<CommunityDetailPage />} />
</Routes>
</main>
<Footer />
Expand Down
10 changes: 10 additions & 0 deletions src/pages/community/CommunityCreatePage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default function CommunityCreatePage() {
return (
<div className="mx-auto w-[1200px] py-12">
<h1 className="text-2xl font-bold text-gray-900">게시글 작성</h1>
<p className="mt-3 text-sm text-gray-600">
PR2-1: 작성 페이지 뼈대(placeholder)
</p>
</div>
)
}
10 changes: 10 additions & 0 deletions src/pages/community/CommunityEditPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default function CommunityEditPage() {
return (
<div className="mx-auto w-[1200px] py-12">
<h1 className="text-2xl font-bold text-gray-900">게시글 수정</h1>
<p className="mt-3 text-sm text-gray-600">
PR2-1: 수정 페이지 뼈대(placeholder)
</p>
</div>
)
}
10 changes: 10 additions & 0 deletions src/pages/community/CommunityListPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default function CommunityListPage() {
return (
<div className="mx-auto w-[1200px] py-12">
<h1 className="text-2xl font-bold text-gray-900">커뮤니티</h1>
<p className="mt-3 text-sm text-gray-600">
PR2-1: 목록 페이지 뼈대(겉껍질)만 연결했습니다.
</p>
</div>
)
}