some fixes

This commit is contained in:
Patryk
2025-06-09 20:59:43 +02:00
parent 77c3a694f8
commit 27175ffa91
7 changed files with 221 additions and 197 deletions

View File

@@ -32,11 +32,8 @@ export default function Home() {
}, [token, fetchNotices]);
const notices = useNoticesStore((state) => state.notices);
// console.log("Notices:", notices);
// console.log("Notices length:", notices.length);
const activeNotices = notices.filter((notice) => notice.status === "ACTIVE");
// console.log("Activer Notices:", activeNotices.length);
const latestNotices = [...activeNotices]
.sort((a, b) => new Date(b.publishDate) - new Date(a.publishDate))
.slice(0, 6);