diff --git a/src/app/components/ModalNotifications.js b/src/app/components/ModalNotifications.js index 89c0c7b6ebfe2ae919e1eaebce64b2350e047d04..0704ca55a840f02dfc19105d64c9f03569c3cee6 100644 --- a/src/app/components/ModalNotifications.js +++ b/src/app/components/ModalNotifications.js @@ -34,8 +34,7 @@ export default function ModalNotifications({ countNotifications, notifications, postViewNotification(payload) } - - console.log ("notificações: ", notifications) + return ( <div> <Button diff --git a/src/app/components/Notifications.js b/src/app/components/Notifications.js index 24b0051af21dc58eb168cff8a08511f966046668..c8d8cd9c8d582863b836fbbd719ff2cf50aad2e1 100644 --- a/src/app/components/Notifications.js +++ b/src/app/components/Notifications.js @@ -33,8 +33,7 @@ export default function Notifications() { .then(({ data }) => { // temp pq o set fica um passo atras ai nao eh possivel usar o set do countNotifications - let temp = data.filter((noti) => {return((noti.viewed === false && noti.activity != "complaint.create"))}) - console.log ("temp", temp) + let temp = data.filter((noti) => {return((noti.viewed === false && noti.activity != "complaint.create"))}) setNotifications(temp) setCountNotifications(temp.length) }) diff --git a/src/app/perfil/[id]/components/EditCollectionButton.js b/src/app/perfil/[id]/components/EditCollectionButton.js index add8304f5bea95a189db9b8a4cf1bfc303407c03..86b5747d80ea6eb506591f0b9e42ff59434d1aef 100644 --- a/src/app/perfil/[id]/components/EditCollectionButton.js +++ b/src/app/perfil/[id]/components/EditCollectionButton.js @@ -16,7 +16,7 @@ export default function EditCollectionButton({ collectionId, collectionData, onU <button className="p-2 text-sm outline outline-1 outline-ice-HC-white text-darkGray-HC-white-underline bg-ice-HC-dark hover:bg-lightGray-HC-white hover:text-darkGray-HC-dark-underline - rounded-lg font-bold normal-case flex items-center justify-center gap-2 lg:w-32 max-lg:mr-1 w-9 max-lg:h-9" + rounded-xl font-bold normal-case flex items-center justify-center gap-2 lg:w-32 max-lg:mr-1 w-9 max-lg:h-9" onClick={() => setEditOpen(true)} aria-label="Editar" > diff --git a/src/app/perfil/[id]/components/ProfileCollections.js b/src/app/perfil/[id]/components/ProfileCollections.js index 67d589727f04fd742efe92e871e8e934cbefa4a1..2502ee6e221e7d8e607966e7c3494bad24c4a641 100644 --- a/src/app/perfil/[id]/components/ProfileCollections.js +++ b/src/app/perfil/[id]/components/ProfileCollections.js @@ -44,7 +44,7 @@ export default function ProfileCollections({ id, idLogin }) { const [editOpen, setEditOpen] = useState(false) const [collections, setCollections] = useState([]) const [totalCount, setTotalCount] = useState(0) - const [deleted, setDeleted] = useState(false) + const [deleted, setDeleted] = useState(false) const [modalOpen, setModalOpen] = useState(false) const [numberCards, setNumberCards] = useState(4) const [deleteOpen, setDeleteOpen] = useState(false) @@ -177,22 +177,26 @@ export default function ProfileCollections({ id, idLogin }) { </button> )} </div> - + <ModalSucess open={modalOpen} onClose={() => setModalOpen(false)} modalOnClose={() => setDeleted(!deleted)} /> - + {collections.length === 0 ? ( <NotFound name="coleções" /> ) : ( <div className="justify-center mt-5"> {collections.map((item, index) => ( <div key={index} className="bg-white-HC-dark outline outline-1 outline-ice-HC-white mb-10 pt-6 px-4 rounded-2xl relative"> - + {/* Cabeçalho com título, autor e botões */} - <div className="flex justify-between items-start"> + <div className="flex justify-between items-start w-full"> {/* Título e autor */} - <div className="flex flex-col"> + <div className="flex flex-col max-w-[60%] max-xl:max-w-[50%] max-md:max-w-[75%]"> <p className="text-2xl font-bold mb-1 text-darkGray-HC-white-underline hover:underline"> - <Link href={`/colecao/${item.id}`}>{item.name}</Link> + <Link href={`/colecao/${item.id}`}> + <span className="block truncate whitespace-nowrap overflow-hidden text-ellipsis"> + {item.name} + </span> + </Link> </p> <p className="ml-1 text-darkGray-HC-white-underline"> por <Link className="hover:underline" href={`/perfil/${item.owner.id}`}>{item.owner.name}</Link> @@ -205,13 +209,13 @@ export default function ProfileCollections({ id, idLogin }) { <DownloadButton id={item.id} objects={item.collection_items} /> <ShareButton id={item.id} type={'colecao'} /> {id === idLogin && ( - <div className="flex lg:gap-2"> + <div className="flex xl:gap-2"> {/* Botão de Editar */} - <EditCollectionButton - collectionId={item.id} + <EditCollectionButton + collectionId={item.id} collectionData={item} onUpdate={fetchCollections} - /> + /> {/* Botão de Excluir */} <button @@ -219,7 +223,7 @@ export default function ProfileCollections({ id, idLogin }) { p-2 max-lg:w-9 max-lg:h-9 max-lg:ml-2 text-sm - rounded-lg + rounded-xl text-black-HC-white font-bold normal-case @@ -230,8 +234,8 @@ export default function ProfileCollections({ id, idLogin }) { lg:gap-2 hover:bg-red-HC-white hover:text-white-HC-dark" - onClick={() => { - setDeleteOpen(true); + onClick={() => { + setDeleteOpen(true); setColToDelete(item.id); }} aria-label="Excluir" @@ -251,14 +255,14 @@ export default function ProfileCollections({ id, idLogin }) { ))} </div> )} - + {/* Botão "Ver mais" abaixo das coleções */} {numberCards < totalCount && ( <Button fullWidth disableElevation variant="outlined" - className="mb-2 border-hidden hover:bg-transparent rounded-lg normal-case" + className="mb-2 border-hidden hover:bg-transparent rounded-xl normal-case" onClick={() => toggleContent()} alt="Ver mais" > @@ -271,6 +275,6 @@ export default function ProfileCollections({ id, idLogin }) { )} </> ); - + }