Added ScreenRotation to notice and updated userNotices
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user