fix: aggreaget match and keyword trim

This commit is contained in:
shinya
2025-07-04 01:23:22 +08:00
parent f266ae0dc1
commit 6492191a2d
10 changed files with 36 additions and 27 deletions

View File

@@ -119,7 +119,7 @@ const AggregateCard: React.FC<AggregateCardProps> = ({
return (
<Link
href={`/aggregate?q=${encodeURIComponent(
query
query.trim()
)}&title=${encodeURIComponent(first.title)}${
year ? `&year=${encodeURIComponent(year)}` : ''
}&type=${mostFrequentEpisodes > 1 ? 'tv' : 'movie'}`}

View File

@@ -53,7 +53,9 @@ const DemoCard = ({ id, title, poster, rate, type }: DemoCardProps) => {
const imgRef = useRef<HTMLImageElement>(null);
const handleClick = () => {
router.push(`/aggregate?q=${encodeURIComponent(title)}&type=${type}`);
router.push(
`/aggregate?q=${encodeURIComponent(title.trim())}&type=${type}`
);
};
return (

View File

@@ -154,7 +154,7 @@ export default function VideoCard({
return (
<Link
href={`/detail?source=${source}&id=${id}&title=${encodeURIComponent(
title
title.trim()
)}${year ? `&year=${year}` : ''}${from ? `&from=${from}` : ''}`}
>
<div