feat: store AP note extensions in JSONB and render movies-diary posts as rich cards
Some checks failed
lint / lint (push) Failing after 7m24s
test / unit (push) Successful in 17m17s
test / integration (push) Failing after 18m2s

This commit is contained in:
2026-05-24 04:29:04 +02:00
parent 3f26456d77
commit 7ee22ae79f
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");