feat: store AP note extensions in JSONB and render movies-diary posts as rich cards

This commit is contained in:
2026-05-24 04:29:04 +02:00
parent f4932af2ba
commit 5097c91261
17 changed files with 227 additions and 9 deletions

View File

@@ -37,6 +37,7 @@ import {
Trash2,
} from "lucide-react";
import { ThoughtForm } from "@/components/thought-form";
import { MovieCard } from "@/components/movie-card";
import Link from "next/link";
import { cn } from "@/lib/utils";
@@ -74,6 +75,17 @@ export function ThoughtCard({
const isAuthor = currentUser?.username === thought.author.username;
const meta = thought.noteExtensions as Record<string, unknown> | null | undefined;
if (meta?.movieTitle) {
return (
<MovieCard
meta={meta as unknown as Parameters<typeof MovieCard>[0]["meta"]}
author={thought.author}
createdAt={new Date(thought.createdAt)}
/>
);
}
const handleDelete = async () => {
setIsAlertOpen(false);
setDeletingState("shaking");