Added ScreenRotation to notice and updated userNotices

This commit is contained in:
2025-06-08 17:22:02 +02:00
parent dbf07cea0a
commit 1d3cbeef3a
4 changed files with 876 additions and 238 deletions

View File

@@ -6,11 +6,12 @@ import { Text } from "@/components/ui/text";
import { VStack } from "@/components/ui/vstack";
import { ActivityIndicator, FlatList } from "react-native";
import { useEffect, useState } from "react";
import {useAuthStore} from "@/store/authStore";
export default function UserNotices() {
const { notices, fetchNotices } = useNoticesStore();
const currentUserId = useAuthStore((state) => state.user_id);
const [isLoading, setIsLoading] = useState(true);
const currentUserId = 1; // Tymczasowo, do czasu zaimplementowania logowania bo nie moge pobrac usera
useEffect(() => {
const loadNotices = async () => {
@@ -24,7 +25,7 @@ export default function UserNotices() {
}
};
loadNotices();
}, []);
}, [fetchNotices]);
const userNotices = notices
.filter((notice) => notice.clientId === currentUserId)