incorporate useIsMobile

this does break ipad pro but whatever
This commit is contained in:
Ivan Evans 2024-08-06 12:30:32 -06:00
parent 6368e7de68
commit 3dcdcba088
2 changed files with 6 additions and 7 deletions

View File

@ -6,6 +6,7 @@ import { Link } from "react-router-dom";
import { mediaItemToId } from "@/backend/metadata/tmdb";
import { DotList } from "@/components/text/DotList";
import { Flare } from "@/components/utils/Flare";
import { useIsMobile } from "@/hooks/useIsMobile";
import { MediaItem } from "@/utils/mediaTypes";
import { MediaBookmarkButton } from "./MediaBookmark";
@ -57,6 +58,8 @@ function MediaCardContent({
const dotListContent = [t(`media.types.${media.type}`)];
const { isMobile } = useIsMobile();
if (media.year) {
dotListContent.push(media.year.toFixed());
}
@ -143,7 +146,9 @@ function MediaCardContent({
) : null}
<div
className="absolute bookmark-button"
className={classNames("absolute", {
"bookmark-button": !isMobile,
})}
onClick={(e) => e.preventDefault()}
>
<MediaBookmarkButton media={media} />

View File

@ -14,9 +14,3 @@
.group:hover .bookmark-button {
opacity: 1;
}
@media (max-width: 1024px) {
.bookmark-button {
opacity: 1 !important;
}
}