Cleanup useEffects
All checks were successful
Docker Deploy / build-and-push (push) Successful in 1m5s

This commit is contained in:
Atridad Lahiji 2025-01-27 22:39:47 -06:00
parent d16f14cafe
commit 3aabecb513
Signed by: atridad
SSH key fingerprint: SHA256:LGomp8Opq0jz+7kbwNcdfTcuaLRb5Nh0k5AchDDb438
3 changed files with 4 additions and 18 deletions

View file

@ -1,7 +1,7 @@
{
"name": "pdsmanager",
"type": "module",
"version": "0.3.4",
"version": "0.3.5",
"scripts": {
"dev": "astro dev",
"build": "astro build",

View file

@ -175,15 +175,9 @@ export default function InviteCodes() {
}, []);
useEffect(() => {
if (typeof window !== "undefined") {
fetchCodes();
}
}, [lastUpdate]);
if (typeof window === "undefined") {
return <div></div>;
}
return (
<div className="card bg-base-100 shadow-xl">
<div className="card-body p-2 sm:p-8">

View file

@ -392,15 +392,11 @@ export default function UserList() {
}
}
if (typeof window !== "undefined") {
checkSettings();
}
}, [lastUpdate]);
useEffect(() => {
if (typeof window !== "undefined" && hasValidSettings) {
fetchUsers();
}
}, [lastUpdate, hasValidSettings]);
useEffect(() => {
@ -409,10 +405,6 @@ export default function UserList() {
};
}, []);
if (typeof window === "undefined") {
return <div></div>;
}
if (!settingsLoaded) {
return (
<div className="card bg-base-100 shadow-xl">