From 2910323721f8a3726da5dd2e69df4b5ba8add901 Mon Sep 17 00:00:00 2001
From: Lucas Schoenfelder <les17@inf.ufpr.br>
Date: Mon, 14 Dec 2020 11:55:16 -0300
Subject: [PATCH] fix redirect to home error; should correctly redirect to the
 appropriate collection page

---
 src/Components/AreasSubPages.js                             | 6 ++++++
 src/Components/CollectionCardFunction.js                    | 4 ++--
 .../TabPanels/PublicUserPageTabs/LastCollections.js         | 1 +
 src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js  | 1 +
 src/Pages/Search.js                                         | 1 +
 5 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/Components/AreasSubPages.js b/src/Components/AreasSubPages.js
index b0ae3f74..a0d0cbf3 100644
--- a/src/Components/AreasSubPages.js
+++ b/src/Components/AreasSubPages.js
@@ -164,6 +164,8 @@ class ReqCollections extends Component {
                 description={card.description}
                 thumbnails={card.items_thumbnails}
                 avatar={card.owner.avatar}
+                id={card.id}
+
               />
             </Col>
           ))}
@@ -178,6 +180,8 @@ class ReqCollections extends Component {
                 description={card.description}
                 thumbnails={card.items_thumbnails}
                 avatar={card.owner.avatar}
+                id={card.id}
+
               />
             </Col>
           ))}
@@ -192,6 +196,8 @@ class ReqCollections extends Component {
                 description={card.description}
                 thumbnails={card.items_thumbnails}
                 avatar={card.owner.avatar}
+                id={card.id}
+                
               />
             </Col>
           ))}
diff --git a/src/Components/CollectionCardFunction.js b/src/Components/CollectionCardFunction.js
index e2976703..45b1a061 100644
--- a/src/Components/CollectionCardFunction.js
+++ b/src/Components/CollectionCardFunction.js
@@ -120,12 +120,12 @@ export default function CollectionCardFunction (props) {
                     <Header onMouseEnter={controlSlide} onMouseLeave={controlSlide}>
                         {/*slide animation and content*/}
                         <Slide direction="right" in={slideIn} timeout={300}>
-                            <a href="" className="text">
+                            <a href={"/colecao-do-usuario/" + props.id} className="text">
                                 {SlideAnimationContent()}
                             </a>
                         </Slide>
                         <Slide direction="left" in={!slideIn} timeout={700}>
-                            <a href=""> {/*add links to collection later*/}
+                            <a href={"/colecao-do-usuario/" + props.id}>
 
                                         <UserInfo>
                                             <AvatarDiv>
diff --git a/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js b/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js
index 495a5e2d..adbb081b 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js
@@ -49,6 +49,7 @@ export default function LastCols (props) {
                                             liked={card.liked}
                                             followed={card.followed}
                                             tags={card.tags}
+                                            id={card.id}
                                         />
                                     </Grid>
                                 )
diff --git a/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js b/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js
index 2ab49230..d7d1ddac 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js
@@ -45,6 +45,7 @@ export default function TabRecursos (props) {
                                 liked={card.liked}
                                 followed={card.followed}
                                 tags={card.tags}
+                                id={card.id}
                             />
                         </Grid>
                     )
diff --git a/src/Pages/Search.js b/src/Pages/Search.js
index 8fbba1a8..ac245543 100644
--- a/src/Pages/Search.js
+++ b/src/Pages/Search.js
@@ -248,6 +248,7 @@ export default function Search(props) {
                       description={card.description}
                       thumbnails={card.items_thumbnails}
                       avatar={card.owner.avatar}
+                      id={card.id}
                     />
                   </Grid>
                 ))}
-- 
GitLab