mirror of https://github.com/sussy-code/smov.git
incorporate useIsMobile
this does break ipad pro but whatever
This commit is contained in:
parent
6368e7de68
commit
3dcdcba088
|
@ -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} />
|
||||
|
|
|
@ -14,9 +14,3 @@
|
|||
.group:hover .bookmark-button {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.bookmark-button {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue