Skip to content

Commit

Permalink
🐛 fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
fnespinoza committed Jan 31, 2024
1 parent 44645bc commit ab51813
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function FormDialog({textButton} : { textButton: string; }) {
dateAdded: new Date(),
});

const [file, setFile] = useState<File | null>(null);
const [file, setFile] = useState<File | any>;
const [textPublishDates, setTextPublishDates] = useState<Dayjs | null>(dayjs());
const [objectAuthors, setObjectAuthors] = useState([{ authorName: "" }]);
const [objectPublishers, setObjectPublishers] = useState([{ publisherName: "" }]);
Expand Down Expand Up @@ -154,7 +154,8 @@ export default function FormDialog({textButton} : { textButton: string; }) {
}

const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const selectedFile = event.target.files?.[0];
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const selectedFile = event.target.files?.[0]!;
// Read excel file content
const reader = new FileReader();
reader.readAsBinaryString(selectedFile);
Expand Down

0 comments on commit ab51813

Please sign in to comment.