Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-06-13 22:32:45 +02:00
3 changed files with 17 additions and 13 deletions

View File

@@ -15,21 +15,21 @@ export default function Home() {
const [isReady, setIsReady] = useState(false);
const fetchNotices = useNoticesStore((state) => state.fetchNotices);
// useEffect(() => {
// setIsReady(true);
// }, []);
useEffect(() => {
setIsReady(true);
}, []);
// useEffect(() => {
// if (isReady && !token) {
// router.replace("/login");
// }
// }, [isReady, token, router]);
useEffect(() => {
if (isReady && !token) {
router.replace("/login");
}
}, [isReady, token, router]);
useEffect(() => {
if (token) {
fetchNotices();
}
}, [token, fetchNotices]);
}, [token]);
const notices = useNoticesStore((state) => state.notices);