s''
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user