From 0e8c8162765fd0a02d7c4e7fe75739f98429bc70 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Mon, 27 Jul 2026 19:47:13 +0700 Subject: [PATCH] style: IDK WHAT IUS FUCKING ON --- app/admin/form/[id]/client.tsx | 147 ++++++++++++++-------------- app/admin/form/[id]/result/page.tsx | 23 +++-- next.config.ts | 3 - 3 files changed, 91 insertions(+), 82 deletions(-) diff --git a/app/admin/form/[id]/client.tsx b/app/admin/form/[id]/client.tsx index 300b481..855c516 100644 --- a/app/admin/form/[id]/client.tsx +++ b/app/admin/form/[id]/client.tsx @@ -201,7 +201,7 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC }); router.refresh(); } catch (err: unknown) { - toast.error(getErrorMessage(err, "Could not delete the question.")); + toast.error(getErrorMessage(err, "Could not remove the question.")); } }; @@ -407,19 +407,53 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC - -
- - {stripHtml(q.label) || `Untitled question ${index + 1}`} - - - Question {index + 1} · {questionTypeLabel(q.type)} - {q.required ? " · Required" : ""} - +
+
+ +
+ + {stripHtml(q.label) || `Untitled question ${index + 1}`} + + + Question {index + 1} · {questionTypeLabel(q.type)} + {q.required ? " · Required" : ""} + +
+
- + + + + + + + Remove question {index + 1}? + + This permanently removes the question and its stored answers. + + + + Keep question + void handleDeleteQuestion(q.id)} + > + Remove question + + + + +
- +
@@ -431,23 +465,6 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC />
- -
+ +
@@ -570,51 +604,18 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC
)} -
-
- {(q.type === "radio" || q.type === "checkbox") && ( -
- handleUpdateQuestion(q.id, { allowOther: checked })} - /> - -
- )} + {(q.type === "radio" || q.type === "checkbox") && ( +
+ handleUpdateQuestion(q.id, { allowOther: checked })} + /> +
- - - - - - - Delete question {index + 1}? - - This permanently removes the question and its stored answers. - - - - Keep question - void handleDeleteQuestion(q.id)} - > - Delete question - - - - -
+ )} diff --git a/app/admin/form/[id]/result/page.tsx b/app/admin/form/[id]/result/page.tsx index 4d0270d..5983b8c 100644 --- a/app/admin/form/[id]/result/page.tsx +++ b/app/admin/form/[id]/result/page.tsx @@ -106,9 +106,12 @@ export default async function ResultsListPage({ Array.isArray(submission.editHistory) && submission.editHistory.length > 0; return ( - + - + {submission.userName || submission.userDiscordId || "Anonymous"} @@ -125,7 +128,7 @@ export default async function ResultsListPage({ {edited ? "Edited" : "Original"} - + @@ -140,10 +143,16 @@ export default async function ResultsListPage({ {rows.map((submission) => { const detailHref = `/admin/form/${id}/result/${submission.id}${listQuery ? `?return=${encodeURIComponent(listQuery)}` : ""}`; return ( - + - + {submission.userName || submission.userDiscordId || "Anonymous"} @@ -154,7 +163,9 @@ export default async function ResultsListPage({ - +
+ +
); diff --git a/next.config.ts b/next.config.ts index d1d22f8..a16b0b5 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,9 +2,6 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { serverExternalPackages: ["bun"], - experimental: { - turbopackFileSystemCacheForBuild: true, - }, turbopack: { root: process.cwd(), },