feat: add corresponding icons to files (#164)

This commit is contained in:
balibabu
2024-03-28 16:18:16 +08:00
committed by GitHub
parent a5384446e3
commit b6837d4ca6
13 changed files with 137 additions and 55 deletions

View File

@@ -38,3 +38,7 @@ export const isFileUploadDone = (file: UploadFile) => file.status === 'done';
export const getExtension = (name: string) =>
name?.slice(name.lastIndexOf('.') + 1).toLowerCase() ?? '';
export const isPdf = (name: string) => {
return getExtension(name) === 'pdf';
};