Localstorage woes again; multiple requests; creating common components
This commit is contained in:
28
src/js/components/AlbumGrid.js
Executable file
28
src/js/components/AlbumGrid.js
Executable file
@ -0,0 +1,28 @@
|
||||
|
||||
import React, { PropTypes } from 'react'
|
||||
import AlbumGridItem from './AlbumGridItem'
|
||||
|
||||
export default class AlbumGrid extends React.Component{
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render(){
|
||||
if( this.props.items ){
|
||||
return (
|
||||
<ul className="grid album-grid">
|
||||
{
|
||||
this.props.items.items.map(
|
||||
(album, index) => {
|
||||
return <AlbumGridItem item={album} key={index} />
|
||||
}
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user