Skip to content

Commit

Permalink
fix: Create album button blank page
Browse files Browse the repository at this point in the history
In 5587dca, we added params to
ALBUMS_MUTATIONS with an extra function in CreateAlbumPicker leading
to the following error "Functions are not valid as a React child.
This may happen if you return a Component instead of <Component />
from render. Or maybe you meant to call this function rather than
return it."
  • Loading branch information
zatteo committed Nov 27, 2024
1 parent 18fcaab commit 01c06c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/photos/ducks/albums/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,13 @@ export const AlbumPhotosWithLoader = () => {
}
}

const CreateAlbumPicker = ({ showAlert, t }) =>
withMutations(ALBUMS_MUTATIONS(showAlert, t))(PhotosPicker)
const CreateAlbumPicker = ({ showAlert, t }) => {
const PhotosPickerWithMutation = withMutations(
ALBUMS_MUTATIONS(showAlert, t)
)(PhotosPicker)

return <PhotosPickerWithMutation />
}

const ConnectedPhotosPicker = ({ ...props }) => {
const { albumId } = useParams()
Expand Down

0 comments on commit 01c06c6

Please sign in to comment.