diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7431aa7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +node_modules +dist +.vite +.DS_Store +*.local + +# Env (keep .env.example) +.env +.env.* +!.env.example diff --git a/src/components/DynamicFeedbackForm.tsx b/src/components/DynamicFeedbackForm.tsx index 847fbe4..e07d986 100644 --- a/src/components/DynamicFeedbackForm.tsx +++ b/src/components/DynamicFeedbackForm.tsx @@ -110,7 +110,10 @@ export function DynamicFeedbackForm({ ) : null}
{fields.map((f) => ( - +
+ + +
))}
{err ?

{err}

: null} @@ -130,6 +133,12 @@ function stripHtml(s: string): string { return s.replace(/<[^>]*>/g, "").trim() || s; } +function FieldRemarks({ text }: { text?: string }) { + const trimmed = text?.trim(); + if (!trimmed) return null; + return

{trimmed}

; +} + function FieldInput({ f, value, diff --git a/src/lib/api.ts b/src/lib/api.ts index 7feb058..bcd5041 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -257,6 +257,7 @@ export type VisitorPublicFeedbackFormField = { required?: boolean; options?: string[]; placeholder?: string; + remarks?: string; }; export type VisitorPublicFeedbackForm = {