diff --git a/client/src/components/ArticleCard.tsx b/client/src/components/ArticleCard.tsx index 19addc9..bb4008d 100644 --- a/client/src/components/ArticleCard.tsx +++ b/client/src/components/ArticleCard.tsx @@ -1,5 +1,6 @@ import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; +import { useLocation } from "wouter"; import type { Article, MediaOutlet } from "@shared/schema"; interface ArticleCardProps { @@ -9,8 +10,10 @@ interface ArticleCardProps { } export default function ArticleCard({ article, outlet, viewMode = "grid" }: ArticleCardProps) { + const [, setLocation] = useLocation(); + const handleClick = () => { - window.location.href = `/articles/${article.slug}`; + setLocation(`/articles/${article.slug}`); }; const formatDate = (date: string | Date) => {