"use client" import styled from "styled-components" import { useReCaptcha } from "next-recaptcha-v3" import { useCallback, useState } from "react" import { requestSendEmail } from "@/services/api-services/emailServices" import { Container, Content } from "@/styles/pageStyles" import { Instagram, Github, Discord, Linkedin } from "react-bootstrap-icons" import Link from "next/link" const ContactForm = styled.form` display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; input, textarea { width: 100%; padding: 1rem; border: 1px solid rgba(var(--white), 0.1); background-color: rgba(var(--white), 0.1); color: rgb(var(--white)); font-family: inherit; outline: none; border-radius: 0.25rem; &:active, &:focus { border-color: rgb(var(--primary)); } } textarea { height: 200px; resize: none; } button { padding: 0.5rem 0.75rem; background-color: rgb(var(--primary), 0.8); color: rgb(var(--white)); border: none; cursor: pointer; font-size: 1.2rem; font-weight: 600; font-family: inherit; transition: background-color 0.2s ease-in-out; border-radius: 0.25rem; &:hover { background-color: rgb(var(--primary)); } &:disabled { background-color: rgba(var(--primary), 0.5); cursor: not-allowed; } } ` const SocialMedia = styled.div` display: flex; gap: 1rem; ` export default function Contact() { const [data, setData] = useState({ name: "", email: "", message: "", }) const [loading, setLoading] = useState(false) const { executeRecaptcha } = useReCaptcha() const handleSubmit = useCallback( async (event: React.FormEvent) => { event.preventDefault() setLoading(true) const recaptchaToken = await executeRecaptcha("form_submit") const response = await requestSendEmail({ ...data, recaptchaToken }) if (response.status === 200) { alert("Email sent successfully!") } else { alert("Failed to send email! Please try again later.") } setLoading(false) }, [executeRecaptcha, data] ) return (

☎️ Get in touch

Feel free to reach out to me for any queries or just to say hi!

setData({ ...data, name: e.target.value })} /> setData({ ...data, email: e.target.value })} />

Or connect with me on social media:

) }