From 7638c23600abd3766f1e57c0e9a7d169fa041481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Wed, 27 Nov 2024 15:16:38 +0100 Subject: [PATCH] fix: Create album button blank page In 5587dcaf4c5eee6af27de07cb476c6fc25de8cde, 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 from render. Or maybe you meant to call this function rather than return it." --- src/photos/ducks/albums/index.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/photos/ducks/albums/index.jsx b/src/photos/ducks/albums/index.jsx index 14617bb4..c6020078 100644 --- a/src/photos/ducks/albums/index.jsx +++ b/src/photos/ducks/albums/index.jsx @@ -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 +} const ConnectedPhotosPicker = ({ ...props }) => { const { albumId } = useParams()