+
);
diff --git a/app/form/admin/result/[id]/client.tsx b/app/form/admin/result/[id]/client.tsx
index 7e8c1d9..553ccb8 100644
--- a/app/form/admin/result/[id]/client.tsx
+++ b/app/form/admin/result/[id]/client.tsx
@@ -77,14 +77,14 @@ export default function SubmissionDetailClient({
Initial Submission:
- {new Date(submission.submittedAt).toLocaleString()}
+ {new Date(submission.submittedAt).toLocaleString(undefined, { hour12: false })}
{editHistory.length > 0 && (
Edit History:
{editHistory.map((edit, idx) => (
- - Edited at {new Date(edit.editedAt).toLocaleString()}
+ - Edited at {new Date(edit.editedAt).toLocaleString(undefined, { hour12: false })}
))}
diff --git a/app/form/client.tsx b/app/form/client.tsx
index deda920..c7fe5af 100644
--- a/app/form/client.tsx
+++ b/app/form/client.tsx
@@ -16,7 +16,7 @@ import { Dialog, DialogContent, DialogTrigger, DialogTitle } from "@/components/
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
import { toast } from "sonner";
import { submitForm, deleteOwnSubmission } from "@/app/actions/submissions";
-import { Loader2, LogOut, ChevronRight, ChevronLeft } from "lucide-react";
+import { Loader2, LogOut } from "lucide-react";
import { signOut } from "next-auth/react";
import Image from "next/image";
import { z } from "zod";
@@ -87,7 +87,6 @@ interface FormFillerClientProps {
}
const LS_KEY = (formId: string) => `form-draft-${formId}`;
-const QUESTIONS_PER_STEP = 3;
const buildSchema = (questions: Question[]) => {
const shape: Record
= {};
@@ -177,27 +176,7 @@ export function FormFillerClient({ form, questions, initialAnswers = {} }: FormF
return () => subscription.unsubscribe();
}, [watch, form.id]);
- const [currentStep, setCurrentStep] = useState(0);
- const totalSteps = Math.ceil(questions.length / QUESTIONS_PER_STEP);
-
- const currentQuestions = questions.slice(
- currentStep * QUESTIONS_PER_STEP,
- (currentStep + 1) * QUESTIONS_PER_STEP
- );
- const nextStep = async () => {
- const fieldsToValidate = currentQuestions.map(q => q.id);
- const isStepValid = await trigger(fieldsToValidate);
- if (isStepValid) {
- setCurrentStep(prev => Math.min(prev + 1, totalSteps - 1));
- window.scrollTo(0, 0);
- }
- };
-
- const prevStep = () => {
- setCurrentStep(prev => Math.max(prev - 1, 0));
- window.scrollTo(0, 0);
- };
const onSubmit = async (values: z.infer) => {
if (!form.isOpen) return;
@@ -276,7 +255,7 @@ export function FormFillerClient({ form, questions, initialAnswers = {} }: FormF