Cleanup useEffects
All checks were successful
Docker Deploy / build-and-push (push) Successful in 1m5s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 1m5s
This commit is contained in:
parent
d16f14cafe
commit
3aabecb513
3 changed files with 4 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "pdsmanager",
|
||||
"type": "module",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
|
|
|
@ -175,15 +175,9 @@ export default function InviteCodes() {
|
|||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined") {
|
||||
fetchCodes();
|
||||
}
|
||||
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">
|
||||
|
|
|
@ -392,15 +392,11 @@ export default function UserList() {
|
|||
}
|
||||
}
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
checkSettings();
|
||||
}
|
||||
checkSettings();
|
||||
}, [lastUpdate]);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined" && hasValidSettings) {
|
||||
fetchUsers();
|
||||
}
|
||||
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">
|
||||
|
|
Loading…
Add table
Reference in a new issue