1
Fork 0

Refactoring

This commit is contained in:
viktorstrate 2019-08-16 22:36:23 +02:00
parent 52d59b965b
commit 5cccc3646b
4 changed files with 4 additions and 5 deletions

View File

@ -59,7 +59,7 @@ const AlbumTitle = ({ album, disableLink = false }) => {
}
AlbumTitle.propTypes = {
album: PropTypes.object.isRequired,
album: PropTypes.object,
disableLink: PropTypes.bool,
}

View File

@ -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}
/>
)}

View File

@ -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,
}

View File

@ -29,7 +29,6 @@ class Sidebar extends React.Component {
}
this.update = content => {
console.log('Updating sidebar', content)
this.setState({ content })
}
}