feat: support mobile video previews
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
import { Link } from "react-router-dom";
|
||||
import { getJSON, itemsOrEmpty, readJSONCache } from "../api";
|
||||
import { langQuery, type Lang } from "../i18n";
|
||||
import { useLocalizedPath } from "../useLocalizedPath";
|
||||
import type { Post, PostListResponse } from "../types/post";
|
||||
import { MessageBubble } from "./messageStream/MessageBubble";
|
||||
import { postDisplayText, postTitleText } from "./messageStream/utils/postText";
|
||||
@@ -126,6 +127,7 @@ export function SearchPanel({
|
||||
onResultClick,
|
||||
}: SearchPanelProps) {
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
const lp = useLocalizedPath();
|
||||
const [tags, setTags] = useState<TagItem[]>([]);
|
||||
const [selectedTag, setSelectedTag] = useState("");
|
||||
const [tagPosts, setTagPosts] = useState<Post[]>([]);
|
||||
@@ -334,7 +336,7 @@ export function SearchPanel({
|
||||
return (
|
||||
<Link
|
||||
key={post.id}
|
||||
to={`/browse?post=${encodeURIComponent(post.id)}`}
|
||||
to={lp(`/browse?post=${encodeURIComponent(post.id)}`)}
|
||||
onClick={onResultClick}
|
||||
className="block rounded-2xl border border-white/10 bg-[#191921] px-4 py-3 transition hover:border-ark-gold/60 hover:bg-[#22232D] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ark-gold/70"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user