feat: support mobile video previews

This commit is contained in:
TerryM
2026-06-01 16:35:40 +08:00
parent c53032155b
commit a968f47640
16 changed files with 275 additions and 47 deletions

View File

@@ -2,6 +2,7 @@ import { Link } from "react-router-dom";
import type { Resource } from "../api";
import { CategoryIcon } from "./CategoryIcon";
import { useI18n } from "../i18n";
import { useLocalizedPath } from "../useLocalizedPath";
import { resourceTypeLabel } from "../resourceTypeLabels";
import { formatDateYmd } from "../utils/format";
@@ -16,10 +17,11 @@ export function LatestUpdateRow({
iconKey: string;
}) {
const { t } = useI18n();
const lp = useLocalizedPath();
const dateStr = formatDateYmd(r.updatedAt);
return (
<Link to={`/resource/${r.id}`} className={LATEST_CARD_CLASS}>
<Link to={lp(`/resource/${r.id}`)} className={LATEST_CARD_CLASS}>
<div className="flex shrink-0 items-center justify-center pt-0.5">
<CategoryIcon
iconKey={iconKey}