zdjęcia pobierają się na głównej stronie + naprawiono kilka innych bugów.

takich jak wyświetlanie "Moich ogłoszeń nie dla poprawnego id etc."
This commit is contained in:
2025-06-08 22:31:52 +02:00
parent bcce392c9b
commit 2218c5eb33
8 changed files with 172 additions and 164 deletions

View File

@@ -1,4 +1,4 @@
import { ScrollView, View } from "react-native";
import { ScrollView } from "react-native";
import { useNoticesStore } from "@/store/noticesStore";
import { CategorySection } from "@/components/CategorySection";
import { NoticeSection } from "@/components/NoticeSection";
@@ -10,7 +10,7 @@ import { useEffect, useState } from "react";
import { SafeAreaView } from "react-native";
export default function Home() {
const token = useAuthStore((state) => state.token);
const { token } = useAuthStore.getState();
const router = useRouter();
const [isReady, setIsReady] = useState(false);
const fetchNotices = useNoticesStore((state) => state.fetchNotices);
@@ -35,7 +35,7 @@ export default function Home() {
// console.log("Notices:", notices);
// console.log("Notices length:", notices.length);
const activeNotices = notices.filter((notice) => notice.status == "ACTIVE");
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))