Skip to content

Commit

Permalink
FIXED:#37 Incorrect post request to firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
areebahmeddd committed Feb 27, 2024
1 parent 10c94aa commit 44d7a09
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/components/Fileinput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 44d7a09

Please sign in to comment.