Refactoring
This commit is contained in:
parent
52d59b965b
commit
5cccc3646b
|
@ -59,7 +59,7 @@ const AlbumTitle = ({ album, disableLink = false }) => {
|
|||
}
|
||||
|
||||
AlbumTitle.propTypes = {
|
||||
album: PropTypes.object.isRequired,
|
||||
album: PropTypes.object,
|
||||
disableLink: PropTypes.bool,
|
||||
}
|
||||
|
||||
|
|
|
@ -144,8 +144,8 @@ const PhotoGallery = ({
|
|||
<Transition {...presentViewTransitionConfig}>
|
||||
{item => props => (
|
||||
<PresentPhoto
|
||||
thumbnail={item.thumbnail.url}
|
||||
photoId={item.id}
|
||||
thumbnail={item && item.thumbnail.url}
|
||||
photoId={item && item.id}
|
||||
style={props}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -117,7 +117,7 @@ export const PresentPhoto = ({
|
|||
|
||||
PresentPhoto.propTypes = {
|
||||
photo: PropTypes.object,
|
||||
thumbnail: PropTypes.string.isRequired,
|
||||
thumbnail: PropTypes.string,
|
||||
imageLoaded: PropTypes.func,
|
||||
photoId: PropTypes.string,
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ class Sidebar extends React.Component {
|
|||
}
|
||||
|
||||
this.update = content => {
|
||||
console.log('Updating sidebar', content)
|
||||
this.setState({ content })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue