@@ -16,39 +16,43 @@ const StyledButton = styled(Button)`
1616 text-transform: capitalize;
1717`
1818
19- const LightItemCardContent = ( { item, chainId, tcrAddress } ) => (
20- < div
21- style = { {
22- height : '100%' ,
23- display : 'flex' ,
24- flexDirection : 'column' ,
25- justifyContent : 'space-between' ,
26- alignItems : 'center'
27- } }
28- >
29- < div >
30- { item . tcrData . mergedData
31- . filter (
32- col =>
33- col . isIdentifier ||
34- col . type === ItemTypes . IMAGE ||
35- col . type === ItemTypes . FILE
36- )
37- . map ( ( column , j ) => (
38- < StyledItemCol key = { j } >
39- < DisplaySelector
40- type = { column . type }
41- value = { column . value }
42- allowedFileTypes = { column . allowedFileTypes }
43- />
44- </ StyledItemCol >
45- ) ) }
19+ const LightItemCardContent = ( { item, chainId, tcrAddress } ) => {
20+ const allowedFileTypes =
21+ item . columns . filter ( col => col . allowedFileTypes ) [ 0 ] ?. allowedFileTypes || ''
22+ return (
23+ < div
24+ style = { {
25+ height : '100%' ,
26+ display : 'flex' ,
27+ flexDirection : 'column' ,
28+ justifyContent : 'space-between' ,
29+ alignItems : 'center'
30+ } }
31+ >
32+ < div >
33+ { item . tcrData . mergedData
34+ . filter (
35+ col =>
36+ col . isIdentifier ||
37+ col . type === ItemTypes . IMAGE ||
38+ col . type === ItemTypes . FILE
39+ )
40+ . map ( ( column , j ) => (
41+ < StyledItemCol key = { j } >
42+ < DisplaySelector
43+ type = { column . type }
44+ value = { column . value }
45+ allowedFileTypes = { allowedFileTypes }
46+ />
47+ </ StyledItemCol >
48+ ) ) }
49+ </ div >
50+ < Link to = { `/tcr/${ chainId } /${ tcrAddress } /${ item . tcrData . ID } ` } >
51+ < StyledButton > Details</ StyledButton >
52+ </ Link >
4653 </ div >
47- < Link to = { `/tcr/${ chainId } /${ tcrAddress } /${ item . tcrData . ID } ` } >
48- < StyledButton > Details</ StyledButton >
49- </ Link >
50- </ div >
51- )
54+ )
55+ }
5256
5357LightItemCardContent . propTypes = {
5458 item : PropTypes . shape ( {
0 commit comments