From 535722c99ff0f6078246d6ec2679bed2d0dff81c Mon Sep 17 00:00:00 2001 From: rfhf19 <rfhf19@inf.ufpr.br> Date: Wed, 6 Nov 2024 16:49:43 -0300 Subject: [PATCH] Issue #214: FIX expand button on profile collection --- src/app/components/GroupCardsCollections.js | 2 +- src/app/perfil/[id]/components/CreateCollectionModal.js | 1 + src/app/perfil/[id]/components/ProfileCollections.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/components/GroupCardsCollections.js b/src/app/components/GroupCardsCollections.js index 572f638e..334ed398 100644 --- a/src/app/components/GroupCardsCollections.js +++ b/src/app/components/GroupCardsCollections.js @@ -69,7 +69,7 @@ export default function GroupCardsCollections({ data, cardsPerRow }) { {expanded ? "Ver menos" : "Ver mais..."} </p> </button> - ) : null} + ) : null} {data?.length > 1 ? < button diff --git a/src/app/perfil/[id]/components/CreateCollectionModal.js b/src/app/perfil/[id]/components/CreateCollectionModal.js index 95b83853..9ad2b62e 100644 --- a/src/app/perfil/[id]/components/CreateCollectionModal.js +++ b/src/app/perfil/[id]/components/CreateCollectionModal.js @@ -72,6 +72,7 @@ export default function CreateCollectionModal({ open, onClose, idLogin }) { }, }); setOpenSucess(true); + setName(""); } catch (error) { // Log de erro caso ocorra console.error("Erro ao criar a coleção:", error); diff --git a/src/app/perfil/[id]/components/ProfileCollections.js b/src/app/perfil/[id]/components/ProfileCollections.js index 24c31c47..d668567d 100644 --- a/src/app/perfil/[id]/components/ProfileCollections.js +++ b/src/app/perfil/[id]/components/ProfileCollections.js @@ -62,7 +62,7 @@ export default function ProfileCollections({ id, idLogin }) { getWidth().then((res) => { setCardsPerRow(Math.floor(res / 300)); }); - }, []); + }, [got]); useEffect(() => { @@ -217,7 +217,7 @@ export default function ProfileCollections({ id, idLogin }) { } </div> </div> - <GroupCardsCollections cardsPerRow={cardsPerRow} data={item.collection_items} /> + <GroupCardsCollections data={item.collection_items} cardsPerRow={cardsPerRow} /> </div> </div> </div> -- GitLab