Unhandled Runtime Error
Top of the code
Other part of the code
How can I fix that?
const doTraduzioneLatino = (text: string) => {
if (textAreaLatinoRef.current?.value) {
return api.user.doTraduzioneLatino.useQuery({ text, email: email ?? '' })
}
} const doTraduzioneLatino = (text: string) => {
if (textAreaLatinoRef.current?.value) {
return api.user.doTraduzioneLatino.useQuery({ text, email: email ?? '' })
}
}Other part of the code
const handleClickLatino = () => {
const text = textAreaLatinoRef?.current?.value;
if (text) {
const notify = () => toast.success("Traduzione in corso...");
notify();
console.log(doTraduzioneLatino(text));
} else {
const notify = () => toast.error("Inserisci un testo!");
notify();
}
} const handleClickLatino = () => {
const text = textAreaLatinoRef?.current?.value;
if (text) {
const notify = () => toast.success("Traduzione in corso...");
notify();
console.log(doTraduzioneLatino(text));
} else {
const notify = () => toast.error("Inserisci un testo!");
notify();
}
}How can I fix that?


