diff --git a/app/contact/page.tsx b/app/contact/page.tsx new file mode 100644 index 0000000..c53c031 --- /dev/null +++ b/app/contact/page.tsx @@ -0,0 +1,5 @@ +import { ContactContent } from "@/components/contact-content"; + +export default function ContactPage() { + return ; +} diff --git a/components/contact-content.tsx b/components/contact-content.tsx new file mode 100644 index 0000000..d3db70d --- /dev/null +++ b/components/contact-content.tsx @@ -0,0 +1,97 @@ +"use client"; + +import { useState } from "react"; +import { Button, Card, Input, Label, Textarea, Typography } from "poyraz-ui/atoms"; + +export function ContactContent() { + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [message, setMessage] = useState(""); + + const isValid = name.trim() && email.trim() && message.trim(); + + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + if (!isValid) return; + + const subject = encodeURIComponent(`Portfolio Contact - ${name.trim()}`); + const body = encodeURIComponent( + `Name: ${name.trim()}\nEmail: ${email.trim()}\n\nMessage:\n${message.trim()}`, + ); + + window.location.href = `mailto:poyrazavsever@gmail.com?subject=${subject}&body=${body}`; + }; + + return ( +
+ + + Contact + +
+ +
+ + Response + + Usually within 24 hours. +
+
+
+ + +
+
+ + setName(event.target.value)} + placeholder="Your name" + className="rounded-sm" + /> +
+ +
+ + setEmail(event.target.value)} + placeholder="you@example.com" + className="rounded-sm" + /> +
+ +
+ +