diff --git a/src/utils/getFileIcon.js b/src/utils/getFileIcon.js index 8fd3d83..c1f2986 100644 --- a/src/utils/getFileIcon.js +++ b/src/utils/getFileIcon.js @@ -1,5 +1,5 @@ export default function getFileIcon(filename) { - const fileExtension = filename.split('.').reverse()[0] + const fileExtension = filename.split(".").reverse()[0]; if (fileTypesMap.image.includes(fileExtension)) { return iconsMap.image; @@ -24,18 +24,18 @@ export default function getFileIcon(filename) { } const iconsMap = { - image: 'https://img.icons8.com/fluency/48/image.png', - audio: 'https://img.icons8.com/color/48/audio-file.png', - video: 'https://img.icons8.com/color/48/cinema---v1.png', - document: 'https://img.icons8.com/color/48/document--v1.png', - archive: 'https://img.icons8.com/color/48/archive.png', - misc: 'https://img.icons8.com/color/48/file.png' -} + image: "https://img.icons8.com/fluency/48/image.png", + audio: "https://img.icons8.com/color/48/audio-file.png", + video: "https://img.icons8.com/color/48/cinema---v1.png", + document: "https://img.icons8.com/color/48/document--v1.png", + archive: "https://img.icons8.com/color/48/archive.png", + misc: "https://img.icons8.com/color/48/file.png", +}; const fileTypesMap = { - image: ['png', 'jpg', 'jpeg', 'gif', 'webp'], - audio: ['mp3', 'aac', 'wav'], - video: ['mp4', 'webm', 'mkv'], - document: ['pdf', 'doc', 'xls', 'xlsx'], - archive: ['iso', 'zip', 'rar', 'tar', 'tar.gz'] -} \ No newline at end of file + image: ["png", "jpg", "jpeg", "gif", "webp"], + audio: ["mp3", "aac", "wav"], + video: ["mp4", "webm", "mkv"], + document: ["pdf", "doc", "xls", "xlsx"], + archive: ["iso", "zip", "rar", "tar", "tar.gz"], +};