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",
|
"name": "pdsmanager",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.3.4",
|
"version": "0.3.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
|
|
|
@ -175,15 +175,9 @@ export default function InviteCodes() {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (typeof window !== "undefined") {
|
fetchCodes();
|
||||||
fetchCodes();
|
|
||||||
}
|
|
||||||
}, [lastUpdate]);
|
}, [lastUpdate]);
|
||||||
|
|
||||||
if (typeof window === "undefined") {
|
|
||||||
return <div></div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card bg-base-100 shadow-xl">
|
<div className="card bg-base-100 shadow-xl">
|
||||||
<div className="card-body p-2 sm:p-8">
|
<div className="card-body p-2 sm:p-8">
|
||||||
|
|
|
@ -392,15 +392,11 @@ export default function UserList() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof window !== "undefined") {
|
checkSettings();
|
||||||
checkSettings();
|
|
||||||
}
|
|
||||||
}, [lastUpdate]);
|
}, [lastUpdate]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (typeof window !== "undefined" && hasValidSettings) {
|
fetchUsers();
|
||||||
fetchUsers();
|
|
||||||
}
|
|
||||||
}, [lastUpdate, hasValidSettings]);
|
}, [lastUpdate, hasValidSettings]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -409,10 +405,6 @@ export default function UserList() {
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (typeof window === "undefined") {
|
|
||||||
return <div></div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!settingsLoaded) {
|
if (!settingsLoaded) {
|
||||||
return (
|
return (
|
||||||
<div className="card bg-base-100 shadow-xl">
|
<div className="card bg-base-100 shadow-xl">
|
||||||
|
|
Loading…
Add table
Reference in a new issue