Skip to content

Commit

Permalink
Merge pull request #139 from keemsebin/feature#134
Browse files Browse the repository at this point in the history
feat : 공지사항 최신순으로 정렬
  • Loading branch information
keemsebin committed May 30, 2024
2 parents ab36bc3 + da82ce0 commit 5b58152
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export default function Index() {
const [infoElement, setInfoElement] = useState(<></>);

const notices = noticedata?.data;
notices?.sort((a, b) => {
return b.id - a.id;
});

useEffect(() => {
setHydrated(true);
Expand All @@ -38,13 +41,6 @@ export default function Index() {
setInfoElement(<AdminHeading />);
}
}
// function openFixZone() {
// const windowOptions = 'width=650,height=650,scrollbars,resizable=no';
// const fixZoneWindow = window.open('fixzone', 'fixzone', windowOptions);
// if (!fixZoneWindow) {
// alert('팝업 차단이 활성화되어 있습니다. 팝업 차단을 해제해주세요.');
// }
// }

return (
<>
Expand Down Expand Up @@ -150,7 +146,6 @@ export default function Index() {
{notices
?.slice(0, 5)
.splice(0)
.reverse()
.map((notice) => (
<li key={notice.id} className="mb-1 w-full border-b">
<Link
Expand Down

0 comments on commit 5b58152

Please sign in to comment.