From 44d7a09e5ed519b0b247dda9cccc627d137f9d7d Mon Sep 17 00:00:00 2001 From: Areeb Ahmed Date: Wed, 28 Feb 2024 00:22:49 +0530 Subject: [PATCH] FIXED:#37 Incorrect post request to firebase --- app/components/Fileinput.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/components/Fileinput.tsx b/app/components/Fileinput.tsx index 736e256..3edab7c 100644 --- a/app/components/Fileinput.tsx +++ b/app/components/Fileinput.tsx @@ -4,7 +4,7 @@ import { useDropzone } from "react-dropzone"; import { v4 as uuidv4 } from 'uuid'; import {useRouter} from "next/navigation"; interface FileInputProps { - onFileUpload: (data: { quizInfo: QuizInfo; quizData: any; fileName: string }) => void; + onFileUpload: (data: any) => void; } interface QuizInfo { @@ -84,9 +84,8 @@ function FileInput({ onFileUpload }: FileInputProps) { const { getRootProps, getInputProps } = useDropzone({ onDrop }); const generateQuiz = () => { - if (quizInfo.quizName && quizInfo.course && quizInfo.courseCode && excelData) { - onFileUpload({ quizInfo, quizData: excelData, fileName }); + onFileUpload({ ...quizInfo, quizData: excelData, fileName }); setQuizGenerated(true); router.push("/"); } else {