Counselllor / Counsellor-Web

Variable used before definition JS-0129
Bug risk
Major
2 occurrences in this check
'ageCalculator' was used before it was defined
 77    }
 78
 79    if (name === "dob") {
 80      let calculateAge = ageCalculator(e.target.value); 81      calculateAge === null ? (calculateAge = "") : null;
 82      setUserInfo((prev) => {
 83        return { ...prev, age: calculateAge };
'isValidUrl' was used before it was defined
 45  };
 46
 47  const handleAddProfile = () => {
 48    if (!newProfile.name || !isValidUrl(newProfile.url)) { 49      alert("Please enter a valid profile name and URL starting with http");
 50      return;
 51    }