{title}
{description &&{description}
} {post?.coverImage && (import { useBlogPost, useBlogPosts } from "@/hooks/use-blog"; import { usePageMeta } from "@/hooks/use-page-meta"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@sase/ui"; import { Link } from "@tanstack/react-router"; import { ChevronRight } from "lucide-react"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; // Blog content is rendered in two shells: the public marketing pages (/blog) // and the dashboard-wrapped pages (/dashboard/blog) so logged-in users keep // the sidebar. Only the internal link targets differ; the canonical URL always // points at the public page. type BlogListPath = "/blog" | "/dashboard/blog"; type BlogPostPath = "/blog/$slug" | "/dashboard/blog/$slug"; // ─── LIST ───────────────────────────────────────────────────────────────────── export function BlogListContent({ postLinkTo }: { postLinkTo: BlogPostPath }) { usePageMeta({ title: "Blog — Sase.tr | Şase & Yedek Parça Rehberi", description: "Şase numarası okuma, OEM vs muadil parça, dijital dönüşüm ve daha fazlası.", canonical: "https://sase.tr/blog", }); // All posts come from the central Directus CMS through the API. const { data: apiPosts, isLoading } = useBlogPosts(); const posts = (apiPosts ?? []) .map((p) => ({ slug: p.slug, title: p.title, description: p.metaDescription ?? "", date: p.publishedAt.slice(0, 10), })) .sort((a, b) => b.date.localeCompare(a.date)); return ( <>
Yedek parça sektörü, araç bakımı ve Sase.tr hakkında güncel yazılar.
{isLoading && posts.length === 0 && (Yükleniyor…
)}{post.description}
Yükleniyor…
; else body = ({isError ? "Yazı bulunamadı." : "Yazı yüklenemedi."}
); return ( <> {/* Breadcrumb */}{description}
} {post?.coverImage && (