import { Show } from "solid-js"; import CardLinks from "./CardLinks"; import DeletePostButton from "./DeletePostButton"; export interface Post { id: number; title: string; subtitle: string | null; body: string | null; banner_photo: string | null; date: string; published: boolean; category: string; author_id: string; reads: number; attachments: string | null; total_likes: number; total_comments: number; } export interface CardProps { post: Post; privilegeLevel: "anonymous" | "admin" | "user"; linkTarget: "blog" | "project"; } export default function Card(props: CardProps) { return (
Not Published
{props.post.title.replaceAll("_",
{props.post.subtitle}
{props.post.title.replaceAll("_", " ")}

{props.post.total_comments || 0} Comments

{props.post.total_likes || 0} Likes

); }