chore: fix build

This commit is contained in:
Kentai Radiquum 2024-11-17 02:43:05 +05:00
parent 58f5c9ce7c
commit 7a95a3e126
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
7 changed files with 15 additions and 4 deletions

View file

@ -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 (