Web: Client: Settings: move checkWidth
This commit is contained in:
parent
b5845e221c
commit
65df8f6bfc
@ -78,16 +78,18 @@ const PasswordStrength = (props) => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
checkWidth();
|
||||
window.addEventListener("resize", checkWidth);
|
||||
|
||||
if (!isInit) initSettings().then(() => setIsLoading(true));
|
||||
else setIsLoading(true);
|
||||
|
||||
return () => window.removeEventListener("resize", checkWidth);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isInit) return;
|
||||
checkWidth();
|
||||
getSettings();
|
||||
window.addEventListener("resize", checkWidth);
|
||||
return () => window.removeEventListener("resize", checkWidth);
|
||||
}, [isLoading]);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -48,16 +48,18 @@ const TwoFactorAuth = (props) => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
checkWidth();
|
||||
window.addEventListener("resize", checkWidth);
|
||||
|
||||
if (!isInit) initSettings().then(() => setIsLoading(true));
|
||||
else setIsLoading(true);
|
||||
|
||||
return () => window.removeEventListener("resize", checkWidth);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isInit) return;
|
||||
checkWidth();
|
||||
getSettings();
|
||||
window.addEventListener("resize", checkWidth);
|
||||
return () => window.removeEventListener("resize", checkWidth);
|
||||
}, [isLoading]);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user