From fb7c86631db2b69de8fa583fa9ea3d0738e27731 Mon Sep 17 00:00:00 2001 From: prayag17 Date: Thu, 11 May 2023 13:00:13 +0530 Subject: [PATCH] Fix Login page does not show each accounts profile picture, showing placeholder instead. Fix #75 --- src/App.jsx | 2 +- src/components/avatar/avatar.jsx | 24 ++--- src/components/card/card.jsx | 123 +++++++++++++---------- src/components/utils/iconsCollection.jsx | 2 + src/routes/login/index.jsx | 4 +- 5 files changed, 87 insertions(+), 68 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index d2c3a48..b36275c 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -408,7 +408,7 @@ function App() { - + {/* */} ); diff --git a/src/components/avatar/avatar.jsx b/src/components/avatar/avatar.jsx index 91b3e8f..94ed7f9 100644 --- a/src/components/avatar/avatar.jsx +++ b/src/components/avatar/avatar.jsx @@ -10,19 +10,17 @@ import "./avatar.module.scss"; export const AvatarImage = ({ userId, userImageTags }) => { return ( - {!!userImageTags && ( -
- )} +
diff --git a/src/components/card/card.jsx b/src/components/card/card.jsx index 9217622..67da305 100644 --- a/src/components/card/card.jsx +++ b/src/components/card/card.jsx @@ -48,6 +48,7 @@ export const Card = ({ blurhash, currentUser, favourite, + disableOverlay, }) => { const navigate = useNavigate(); const [imgLoading, setImgLoading] = useState(true); @@ -175,6 +176,7 @@ export const Card = ({
{imageTags && (cardType == "thumb" ? ( @@ -210,10 +212,17 @@ export const Card = ({ )} - - - {availableMarkButtonTypes.includes( - iconType, - ) && ( - { - e.preventDefault(); - e.stopPropagation(); - handleMarkAsPlayOrUnMarkAsPlay(); - }} - onFocus={(e) => e.stopPropagation} - > - + + {availableMarkButtonTypes.includes( + iconType, + ) && ( + { + e.preventDefault(); + e.stopPropagation(); + handleMarkAsPlayOrUnMarkAsPlay(); }} - /> - - )} - {allowedLikeButton.includes(iconType) && ( - { - e.preventDefault(); - e.stopPropagation(); - handleLiking(); - }} - onFocus={(e) => e.stopPropagation} - > - {isFavorite ? ( - + e.stopPropagation + } + > + - ) : ( - - )} - - )} - - + + )} + {allowedLikeButton.includes( + iconType, + ) && ( + { + e.preventDefault(); + e.stopPropagation(); + handleLiking(); + }} + onFocus={(e) => + e.stopPropagation + } + > + {isFavorite ? ( + + ) : ( + + )} + + )} + + + )} , @@ -97,6 +98,7 @@ export const TypeIconCollectionCard = { Trailer: , TvChannel: , TvProgram: , + User: , UserRootFolder: , UserView: , Video: , diff --git a/src/routes/login/index.jsx b/src/routes/login/index.jsx index ab204ef..84681e3 100644 --- a/src/routes/login/index.jsx +++ b/src/routes/login/index.jsx @@ -287,8 +287,8 @@ export const UserLogin = () => { imageTags={ !!item.PrimaryImageTag } - // cardType="sqaure" - iconType="Person" + disableOverlay + iconType="User" cardOrientation="sqaure" onClickEvent={() => navigate(