"use client"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Textarea } from "@/components/ui/textarea"; import * as React from "react"; import { Card, CardDescription, CardFooter, CardHeader, CardTitle, } from "@/components/ui/card"; export function Support() { const [open, setOpen] = React.useState(false); const [submitting, setSubmitting] = React.useState(false); const formRef = React.useRef(null); async function onSubmit(event: React.FormEvent) { event.preventDefault(); if (submitting) return; setSubmitting(true); const form = new FormData(event.currentTarget); const payload = { name: String(form.get("name") || ""), email: String(form.get("email") || ""), company: String(form.get("company") || ""), website: String(form.get("website") || ""), userCount: String(form.get("userCount") || ""), interest: String(form.get("interest") || ""), features: String(form.get("features") || ""), additional: String(form.get("additional") || ""), }; try { const res = await fetch("/api/support", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }); if (!res.ok) throw new Error("Failed to submit"); setOpen(false); formRef.current?.reset(); // optionally add a toast later } catch (e) { console.error(e); // optionally add error toast } finally { setSubmitting(false); } } return ( Dedicated Support We're now offering on demand support for Better Auth and Auth.js. Including help out migrations, consultations, premium dedicated support and more. If you're interested, please get in touch.
Request dedicated support Tell us about your team and what you're looking for.