This commit is contained in:
eric
2026-06-06 04:29:46 -05:00
parent 88aa96a2a1
commit 41493c35ca
50 changed files with 4666 additions and 416 deletions

View File

@@ -3,6 +3,7 @@
import { useState } from "react";
import { useTranslation } from "@/i18n/navigation";
import Footer from "@/app/components/Footer";
import { apiFetch } from "@/app/lib/api-client";
export default function FeedbackPage() {
const { t } = useTranslation("feedback");
@@ -14,8 +15,12 @@ export default function FeedbackPage() {
content: "",
});
const handleSubmit = (e: React.FormEvent) => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
await apiFetch("/api/feedback", {
method: "POST",
body: JSON.stringify(form),
});
setSubmitted(true);
};
@@ -135,7 +140,7 @@ export default function FeedbackPage() {
</div>
<p className="text-xs text-gray-400 dark:text-gray-500">
{t("demoHint")}
已接入本地 FastAPI + PocketBase,提交后会写入 feedback 集合。
</p>
<button