{"size": 886, "ext": "js", "max_stars_repo_path": "horror-client/src/components/layout/verification/VerificationLink.js", "max_stars_repo_name": "emirsagit/horror-stories", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "horror-client/src/components/layout/verification/VerificationLink.js", "max_issues_repo_name": "emirsagit/horror-stories", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "horror-client/src/components/layout/verification/VerificationLink.js", "max_forks_repo_name": "emirsagit/horror-stories", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.8148148148, "max_line_length": 114, "alphanum_fraction": 0.6343115124}
import api from "../../../utils/api";
import { CLIENT_BASE_URL } from "../../../constants/env";
import { REDIRECT_AFTER_VERIFICATION } from "../../../constants/routes";

export default function VerificationLink() {
  function handleClick() {
    api()
      .post("/api/email/verify", {
        redirect_url: CLIENT_BASE_URL + REDIRECT_AFTER_VERIFICATION.url,
      })
      .then((response) => {
        console.log(response);
        setUser("");
      })
      .catch((error) => console.log(error));
  }

  return (
    <div className="fixed bottom-0 left-0 right-0 p-4 bg-gray-100 flex flex-col">
      <p className="m-auto text-center max-w-32">Sitemizden yararlanmak için lütfen mail adresinizi onaylayın.</p>
      <button className="block text-blue-900 underline" onClick={handleClick} type="button">
        Onaylama E-postasını Tekrar gönder
      </button>
    </div>
  );
}
