mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-28 00:49:40 +05:00
chore: fix build
This commit is contained in:
parent
58f5c9ce7c
commit
7a95a3e126
7 changed files with 15 additions and 4 deletions
|
@ -44,6 +44,7 @@ export const ProfileEditLoginModal = (props: {
|
|||
_setLoginLength(data.login.length);
|
||||
setLoading(false);
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [props.isOpen]);
|
||||
|
||||
function handleInput(e: any) {
|
||||
|
|
|
@ -69,15 +69,15 @@ export const ProfileEditModal = (props: {
|
|||
9: "Неизвестно",
|
||||
};
|
||||
|
||||
function _fetchInfo(url: string) {
|
||||
function useFetchInfo(url: string) {
|
||||
const { data, isLoading, error } = useSWR(url, fetcher);
|
||||
return [data, isLoading, error];
|
||||
}
|
||||
|
||||
const [prefData, prefLoading, prefError] = _fetchInfo(
|
||||
const [prefData, prefLoading, prefError] = useFetchInfo(
|
||||
`${ENDPOINTS.user.settings.my}?token=${props.token}`
|
||||
);
|
||||
const [loginData, loginLoading, loginError] = _fetchInfo(
|
||||
const [loginData, loginLoading, loginError] = useFetchInfo(
|
||||
`${ENDPOINTS.user.settings.login.info}?token=${props.token}`
|
||||
);
|
||||
|
||||
|
@ -141,6 +141,7 @@ export const ProfileEditModal = (props: {
|
|||
}
|
||||
});
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [avatarUri]);
|
||||
|
||||
return (
|
||||
|
|
|
@ -69,8 +69,10 @@ export const ProfileEditSocialModal = (props: {
|
|||
});
|
||||
setLoading(false);
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [props.isOpen]);
|
||||
|
||||
|
||||
function handleInput(e: any) {
|
||||
const social = {
|
||||
...socials,
|
||||
|
|
|
@ -21,6 +21,7 @@ export const ProfileEditStatusModal = (props: {
|
|||
useEffect(() => {
|
||||
_setStatus(props.status);
|
||||
_setStringLength(props.status.length);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [props.isOpen]);
|
||||
|
||||
function handleInput(e: any) {
|
||||
|
|
|
@ -65,6 +65,7 @@ export const ProfileStats = (props: {
|
|||
);
|
||||
chart.render();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -91,6 +91,7 @@ export const ProfileWatchDynamic = (props: { watchDynamic: Array<any> }) => {
|
|||
);
|
||||
chart.render();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue