Unhandled Runtime Error

Top of the code
  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();
    }
  }


How can I fix that?
image.png
Was this page helpful?