Fix card overlay actin buttons going to item page

This commit is contained in:
prayag17 committed 2023-05-01 14:08:58 +05:30
1 parent 7c1df32117
commit fbe31a190a
3 files changed
+8 -8

No files matched your search

+7 -6
View File
@@ -92,8 +92,6 @@ export const Card = ({
"BoxSet", "BoxSet",
"CollectionFolder", "CollectionFolder",
"Movie", "Movie",
"MusicAlbum",
"MusicVideo",
"Season", "Season",
"Series", "Series",
"Video", "Video",
@@ -140,6 +138,7 @@ export const Card = ({
? onClickEvent ? onClickEvent
: () => { : () => {
navigate(`/item/${itemId}`); navigate(`/item/${itemId}`);
console.log("going...");
} }
} }
className="cardBox" className="cardBox"
@@ -290,11 +289,12 @@ export const Card = ({
iconType, iconType,
) && ( ) && (
<IconButton <IconButton
onMouseDown={(e) => { onClick={(e) => {
e.stopPropagation();
e.preventDefault(); e.preventDefault();
e.stopPropagation();
handleMarkAsPlayOrUnMarkAsPlay(); handleMarkAsPlayOrUnMarkAsPlay();
}} }}
onFocus={(e) => e.stopPropagation}
> >
<MdiCheck <MdiCheck
sx={{ sx={{
@@ -307,11 +307,12 @@ export const Card = ({
)} )}
{allowedLikeButton.includes(iconType) && ( {allowedLikeButton.includes(iconType) && (
<IconButton <IconButton
onMouseDown={(e) => { onClick={(e) => {
e.stopPropagation();
e.preventDefault(); e.preventDefault();
e.stopPropagation();
handleLiking(); handleLiking();
}} }}
onFocus={(e) => e.stopPropagation}
> >
{isFavorite ? ( {isFavorite ? (
<MdiHeart <MdiHeart
+1 -1
View File
@@ -6,7 +6,7 @@ import { mdiCheck } from "@mdi/js";
export const MdiCheck = (props) => { export const MdiCheck = (props) => {
return ( return (
<SvgIcon color="red" {...props}> <SvgIcon {...props}>
<path d={mdiCheck}></path> <path d={mdiCheck}></path>
</SvgIcon> </SvgIcon>
); );
-1
View File
@@ -396,7 +396,6 @@ const LibraryView = () => {
useEffect(() => { useEffect(() => {
if (viewType.length != 0) { if (viewType.length != 0) {
setCurrentViewType(viewType[0].value); setCurrentViewType(viewType[0].value);
console.log(viewType);
} }
}, [viewType]); }, [viewType]);