fix uset notice list
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useNoticesStore } from "@/store/noticesStore";
|
||||
import { NoticeCard } from "@/components/NoticeCard";
|
||||
import { Button, ButtonText } from "@/components/ui/button";
|
||||
|
||||
import { usePathname } from "expo-router";
|
||||
import { Box } from "@/components/ui/box";
|
||||
import { Text } from "@/components/ui/text";
|
||||
import { VStack } from "@/components/ui/vstack";
|
||||
@@ -16,6 +16,7 @@ import { useRouter } from "expo-router";
|
||||
|
||||
export default function UserNotices() {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const { notices, fetchNotices, deleteNotice } = useNoticesStore();
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isRedirecting, setIsRedirecting] = useState(false);
|
||||
@@ -41,7 +42,7 @@ export default function UserNotices() {
|
||||
}
|
||||
};
|
||||
loadNotices();
|
||||
}, [fetchNotices]);
|
||||
}, [pathname, fetchNotices]);
|
||||
|
||||
const showNewToast = (title) => {
|
||||
const newId = Math.random();
|
||||
|
||||
Reference in New Issue
Block a user