File tree Expand file tree Collapse file tree 2 files changed +14
-19
lines changed Expand file tree Collapse file tree 2 files changed +14
-19
lines changed Original file line number Diff line number Diff line change 2222.share-button {
2323 margin-right : 2em ;
2424}
25+
26+ .gallery-container {
27+ height : 34% ;
28+ width : 34% ;
29+ }
Original file line number Diff line number Diff line change @@ -94,18 +94,13 @@ const Story = (props) => {
9494 const hashtagsArray = [ 'EOS' , 'userstory' ]
9595 const title = 'EOS User Story - POST Stories. GET Features.'
9696
97- const displayImages = ( ) => {
98- const images = [ ]
99- for ( let i = 0 ; i < 3 ; i ++ ) {
100- images . push ( {
101- original : story . Attachment [ `${ i } ` ] . url ,
102- thumbnail : story . Attachment [ `${ i } ` ] . url
103- } )
104- }
105- return images
106- }
107-
108- const images = [ ] . concat ( displayImages ( ) )
97+ const images =
98+ story . Attachment ?. map ( ( attachment ) => {
99+ return {
100+ original : attachment . url ,
101+ thumbnail : attachment . url
102+ }
103+ } ) ?? [ ]
109104
110105 return (
111106 < >
@@ -238,13 +233,8 @@ const Story = (props) => {
238233 />
239234 ) }
240235 </ div >
241- < div >
242- < ImageGallery
243- items = { images }
244- showBullets = { true }
245- originalClass = { 'galleryoriginal' }
246- thumbnailClass = { 'galleryThumbnail' }
247- />
236+ < div className = 'gallery-container' >
237+ < ImageGallery items = { images } showBullets = { true } />
248238 </ div >
249239 < Comments storyId = { storyId } />
250240 </ div >
You can’t perform that action at this time.
0 commit comments