import React from "react" import { useTranslation } from "react-i18next" import Seo from "@/components/seo" /** * Contact page component that encourages manual GitHub Issue submission. */ export default function Contact() { const { t } = useTranslation() const owner = "onixbyte" const repo = "dev-lab" const handleRedirect = (e: React.FormEvent) => { e.preventDefault() const formData = new FormData(e.currentTarget) const subject = formData.get("subject") as string const name = formData.get("name") as string const email = formData.get("email") as string const message = formData.get("message") as string const type = formData.get("type") as string // Construct a professional body template for the GitHub issue const issueBody = ` ### Description ${message} --- *Generated via DevLab Contact Page* `.trim() const githubUrl = `https://github.com/${owner}/${repo}/issues/new?title=${encodeURIComponent( `[${type == "help wanted" ? t("contact.types.helpWanted") : (type == "enhancement" ? t("contact.types.enhancement") : t("contact.types.bug"))}] ${subject}` )}&body=${encodeURIComponent(issueBody)}&labels=${type}` // Open in a new tab so they don't lose their place on your site window.open(githubUrl, "_blank", "noopener,noreferrer") } return (
{/* Header */}

{t("contact.title")}

{t("contact.description")}

{/* Left Side: Information */}

🤝 {t("contact.whyGitHub.title")}

{t("contact.whyGitHub.description")}

{t("contact.howItWorks.title")}

  1. {t("contact.howItWorks.step1")}
  2. {t("contact.howItWorks.step2")}
  3. {t("contact.howItWorks.step3")}
  4. {t("contact.howItWorks.step4")}

{t("contact.email")}
real@zihluwang.me

{/* Right Side: Form */}

{t("contact.form.typeHelp")}