Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
congmul committed Jul 10, 2024
1 parent 2554e04 commit 9c5c430
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Readfile/Readfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ const ReadJSONYAMLfile:React.FC<ReadJSONYAMLfileType> = ({setContent, isMulipleF
fileReader.onloadend = handleFileRead;
if(file == null || !(file.type === "application/json" || file.type === "application/x-yaml")) return;

file.type === "application/json" ? setFileType('json') : setFileType('yaml')
file.type === "application/json" ? setFileType('json') : setFileType('yaml');

// TODO: need to store file format globally
console.log(fileType);
setFileName(file.name);
fileReader.readAsText(file);
}
Expand Down

0 comments on commit 9c5c430

Please sign in to comment.