jam411 3 лет назад
Родитель
Сommit
4e1912135b
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      packages/ui/src/components/Attachment/Attachment.tsx

+ 2 - 5
packages/ui/src/components/Attachment/Attachment.tsx

@@ -17,11 +17,8 @@ export const Attachment = (props: AttachmentProps): JSX.Element => {
     attachment, inUse, isUserLoggedIn, onAttachmentDeleteClicked,
   } = props;
 
-  const iconNameByFormat = (format) => {
-    if (format.match(/image\/.+/i)) {
-      return 'icon-picture';
-    }
-    return 'icon-doc';
+  const iconNameByFormat = (format: string) => {
+    return (format.match(/image\/.+/i)) ? 'icon-picture' : 'icon-doc';
   };
 
   const _onAttachmentDeleteClicked = () => {