-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from KTwizviz/dev
Dev -> Main 합병
- Loading branch information
Showing
17 changed files
with
499 additions
and
135 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
import NewsCard from "@/components/media/news-card"; | ||
import CustomPagination from "@/components/ui/custom-pagination"; | ||
import { CustomSelectWithInput } from "@/components/ui/custom-select"; | ||
import { NewsData } from "@/constants/news-data"; | ||
|
||
type NewsPageProps = { | ||
searchParams: { page?: string }; | ||
}; | ||
export default function NewsPage({ searchParams }: NewsPageProps) { | ||
const currentPage = Number(searchParams.page) || 1; | ||
const itemsPerPage = 5; | ||
|
||
const currentItems = NewsData.slice( | ||
(currentPage - 1) * itemsPerPage, | ||
currentPage * itemsPerPage | ||
); | ||
|
||
export default function page() { | ||
return ( | ||
<div> | ||
<NewsCard | ||
title="2024 kt wiz 73승 기념뱃지 수령" | ||
content="감사원은 원장을 포함한 5인 이상 11인 이하의 감사위원으로 구성한다. 국회가 재적의원 과반수의 찬성으로 계엄의 해제를 요구한 때에는 대통령은 이를 해제하여야 한다. 이 헌법시행 당시의 대법원장과 대법원판사가 아닌 법관은 제1항 단서의 규정에 불구하고 이 헌법에 의하여 임명된 것으로 본다. 명령·규칙 또는 처분이 헌법이나 법률에 위반되는 여부가 재판의 전제가 된 경우에는 대법원은 이를 최종적으로 심사할 권한을 가진다." | ||
date={new Date("2024-12-25")} | ||
views={99} | ||
/> | ||
</div> | ||
<> | ||
<CustomSelectWithInput /> | ||
{currentItems.map((news) => ( | ||
<NewsCard | ||
key={news.id} | ||
title={news.title} | ||
content={news.content} | ||
date={news.date} | ||
views={news.views} | ||
/> | ||
))} | ||
<div className="p-4"> | ||
<CustomPagination /> | ||
</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function page() { | ||
return <div>page입니다</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function page() { | ||
return <div>page입니다</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function page() { | ||
return <div>page입니다</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
Pagination, | ||
PaginationContent, | ||
// PaginationEllipsis, | ||
PaginationItem, | ||
PaginationLink, | ||
PaginationNext, | ||
PaginationPrevious, | ||
} from "@/components/ui/pagination"; | ||
|
||
export default function CustomPagination() { | ||
return ( | ||
<Pagination> | ||
<PaginationContent> | ||
<PaginationItem> | ||
<PaginationPrevious href="#" /> | ||
</PaginationItem> | ||
<PaginationItem> | ||
<PaginationLink href="#">1</PaginationLink> | ||
</PaginationItem> | ||
<PaginationItem> | ||
<PaginationLink href="#">2</PaginationLink> | ||
</PaginationItem> | ||
<PaginationItem> | ||
<PaginationLink href="#">3</PaginationLink> | ||
</PaginationItem> | ||
<PaginationItem> | ||
<PaginationLink href="#">4</PaginationLink> | ||
</PaginationItem> | ||
<PaginationItem> | ||
<PaginationLink href="#">5</PaginationLink> | ||
</PaginationItem> | ||
{/* <PaginationItem> | ||
<PaginationEllipsis /> | ||
</PaginationItem> */} | ||
<PaginationItem> | ||
<PaginationNext href="#" /> | ||
</PaginationItem> | ||
</PaginationContent> | ||
</Pagination> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import * as React from "react"; | ||
|
||
import { | ||
Select, | ||
SelectContent, | ||
SelectGroup, | ||
SelectItem, | ||
SelectTrigger, | ||
SelectValue, | ||
} from "@/components/ui/select"; | ||
import { Input } from "@/components/ui/input"; | ||
import { Button } from "@/components/ui/button"; | ||
|
||
export function CustomSelectWithInput() { | ||
return ( | ||
<div className="flex gap-1"> | ||
<Select> | ||
<SelectTrigger className="w-[180px]"> | ||
<SelectValue placeholder="제목" /> | ||
</SelectTrigger> | ||
<SelectContent> | ||
<SelectGroup className="bg-SYSTEM-white"> | ||
<SelectItem value="apple">제목</SelectItem> | ||
<SelectItem value="banana">내용</SelectItem> | ||
</SelectGroup> | ||
</SelectContent> | ||
</Select> | ||
<Input | ||
id="picture" | ||
type="text" | ||
className="w-[300px]" | ||
placeholder="검색어를 입력해주세요" | ||
/> | ||
<Button className="border">검색</Button> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.