import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { useGalleryDoc } from "../hook/useGalleryDoc.ts"; import TagBadge from "@/components/gallery/TagBadge"; import StyledLink from "@/components/gallery/StyledLink"; import { Link } from "wouter"; import { classifyTags } from "../lib/classifyTags.tsx"; import { DescTagItem, DescItem } from "../components/gallery/DescItem.tsx"; export interface ContentInfoPageProps { params: { id: string; }; } export function ContentInfoPage({ params }: ContentInfoPageProps) { const { data, error, isLoading } = useGalleryDoc(params.id); if (isLoading) { return
Loading...
} if (error) { return
Error: {String(error)}
} if (!data) { return
Not found
} const tags = data?.tags ?? []; const classifiedTags = classifyTags(tags); const contentLocation = `/doc/${params.id}/reader`; return (
{data.title}
{data.title} {classifiedTags.type[0] ?? "N/A"}
{new Date(data.created_at).toLocaleString()} / {new Date(data.modified_at).toLocaleString()} {data.content_hash} {`${data.basepath}/${data.filename}`} {data.pagenum}
Tags
    {classifiedTags.rest.map((tag) => )}
); } export default ContentInfoPage;