11/* eslint-disable no-unsafe-optional-chaining */
2- import React , { useEffect , useState } from 'react' ;
2+ import { useEffect , useState } from 'react' ;
3+
34import { Box , Text , TextClamp , FileIcon } from '@bubbles-ui/components' ;
4- import useTranslateLoader from '@multilanguage/useTranslateLoader' ;
55import { DuplicateIcon } from '@bubbles-ui/icons/outline' ;
6+ import useTranslateLoader from '@multilanguage/useTranslateLoader' ;
7+
8+ import prefixPn from '../../../../helpers/prefixPN' ;
9+
610import {
711 METADATA_DISPLAY_PROP_TYPES ,
812 METADATA_DISPLAY_DEFAULT_PROPS ,
913} from './MetadataDisplay.constants' ;
1014import { MetadataDisplayStyles } from './MetadataDisplay.styles' ;
11- import prefixPn from '../../../../helpers/prefixPN' ;
1215
1316const MetadataDisplay = ( { metadata, onCopy } ) => {
1417 const [ data , setData ] = useState ( ) ;
18+
19+ console . log ( 'metadata' , metadata ) ;
20+
1521 const fileSizeMB = metadata ?. file ?. size / 1024 / 1024 ;
1622 const fileSizeDocument = metadata ?. fileType === 'document' && metadata ?. metadata [ 0 ] ?. value ;
1723 const getImageDimensions = ( ) => {
@@ -152,7 +158,7 @@ const MetadataDisplay = ({ metadata, onCopy }) => {
152158 </ Box >
153159 < Box >
154160 < Text className = { classes . title } > { `${ t ( 'size' ) } : ` } </ Text >
155- < Text className = { classes . value } > { `${ fileSizeDocument } ` } </ Text >
161+ < Text className = { classes . value } > { `${ data ?. size } ` } </ Text >
156162 </ Box >
157163 </ Box >
158164 ) }
@@ -162,14 +168,14 @@ const MetadataDisplay = ({ metadata, onCopy }) => {
162168 < Text className = { classes . title } > { `${ t ( 'duration' ) } : ` } </ Text >
163169 < Text className = { classes . value } > { `${ data ?. duration } ` } </ Text >
164170 </ Box >
165- < Box >
166- < Text className = { classes . title } > { `${ t ( 'size' ) } : ` } </ Text >
167- < Text className = { classes . value } > { `${ data ?. size } ` } </ Text >
168- </ Box >
169171 < Box >
170172 < Text className = { classes . title } > { `${ t ( 'format' ) } : ` } </ Text >
171173 < Text className = { classes . value } > { `${ data ?. format } ` } </ Text >
172174 </ Box >
175+ < Box >
176+ < Text className = { classes . title } > { `${ t ( 'size' ) } : ` } </ Text >
177+ < Text className = { classes . value } > { `${ data ?. size } ` } </ Text >
178+ </ Box >
173179 </ Box >
174180 ) }
175181 { metadata ?. fileType === 'bookmark' && (
0 commit comments