File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,15 +5,13 @@ import map from 'lodash/map'
55import Container from 'react-bootstrap/Container'
66import Album from './album.jsx'
77
8- const AlbumGallery = gallery => {
9- console . info ( 'gallery' )
10-
8+ const AlbumGallery = ( { gallery } ) => {
119 return (
1210 < div className = "album-gallery" >
1311 < h3 > Albums</ h3 >
1412 < Container >
15- { ! isEmpty ( gallery ) && map ( gallery , album => < Album key = { album . name } name = { album . name } /> ) }
16- < Album create />
13+ { ! isEmpty ( gallery ) && map ( gallery , ( album , index ) => < Album key = { index } name = { album . name } /> ) }
14+ < Album key = "new" create />
1715 </ Container >
1816 </ div >
1917 )
Original file line number Diff line number Diff line change 11import React from 'react'
22
33const Album = ( { create, name } ) => {
4- console . info ( 'Console name: ' , name )
5-
64 const getAlbumName = ( ) => {
75 console . info ( 'get name' )
86 }
Original file line number Diff line number Diff line change @@ -5,13 +5,12 @@ import AlbumGallery from '../../components/album/album-gallery'
55import PhotoCard from '../../components/photo/photo-card'
66
77const HomePage = ( { albums } ) => {
8+ console . info ( albums )
9+
810 return (
911 < div >
1012 < h2 > Home Page</ h2 >
1113
12- < br />
13- < br />
14- < br />
1514 < PhotoCard title = "Photo Title" description = "This is some text" />
1615
1716 < AlbumGallery gallery = { albums } />
@@ -21,7 +20,7 @@ const HomePage = ({ albums }) => {
2120
2221const mapStateToProps = state => {
2322 return {
24- albums : ( ) => getAlbumList ( state ) ,
23+ albums : getAlbumList ( state ) ,
2524 }
2625}
2726
You can’t perform that action at this time.
0 commit comments