feat: support mobile video previews
This commit is contained in:
@@ -4,6 +4,7 @@ import { Link } from "react-router-dom";
|
||||
import type { Resource } from "../api";
|
||||
import { assetUrl } from "../api";
|
||||
import { useI18n } from "../i18n";
|
||||
import { useLocalizedPath } from "../useLocalizedPath";
|
||||
import { useMemo, useState } from "react";
|
||||
import { formatDateYmd } from "../utils/format";
|
||||
import { DownloadCloudIcon } from "./icons/DownloadCloudIcon";
|
||||
@@ -49,6 +50,7 @@ export function RecommendedCard({
|
||||
layout?: "carousel" | "grid";
|
||||
}) {
|
||||
const { t } = useI18n();
|
||||
const lp = useLocalizedPath();
|
||||
const { showToast } = useToast();
|
||||
const [isDownloading, setIsDownloading] = useState(false);
|
||||
const figmaCover =
|
||||
@@ -105,7 +107,7 @@ export function RecommendedCard({
|
||||
}`}
|
||||
>
|
||||
<Link
|
||||
to={`/resource/${r.id}`}
|
||||
to={lp(`/resource/${r.id}`)}
|
||||
aria-label={displayTitle}
|
||||
className="absolute inset-0 z-10 outline-none focus-visible:ring-2 focus-visible:ring-ark-gold/70"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user