@@ -43,6 +43,11 @@ function Badges({ genre, writerType, status, isNsfw }: { genre?: string | null;
Ongoing
)}
+ {contentType === "cartoon" && (
+
+ Cartoon
+
+ )}
{isNsfw && (
18+
@@ -77,7 +82,7 @@ export function StoryCard({
/>
-
+
@@ -102,7 +107,7 @@ export function StoryCard({
-
+
{/* Centered title with accent line */}
diff --git a/src/components/__tests__/StoryCard.test.tsx b/src/components/__tests__/StoryCard.test.tsx
index 43b428d0..6fa1ee82 100644
--- a/src/components/__tests__/StoryCard.test.tsx
+++ b/src/components/__tests__/StoryCard.test.tsx
@@ -90,4 +90,14 @@ describe("StoryCard", () => {
render();
expect(screen.getByText("AI Writer")).toBeInTheDocument();
});
+
+ it("shows Cartoon badge when content_type is cartoon", () => {
+ render();
+ expect(screen.getAllByText("Cartoon").length).toBeGreaterThan(0);
+ });
+
+ it("does not show Cartoon badge for fiction stories", () => {
+ render();
+ expect(screen.queryByText("Cartoon")).not.toBeInTheDocument();
+ });
});
diff --git a/supabase/migrations/00039_add_content_type.sql b/supabase/migrations/00039_add_content_type.sql
new file mode 100644
index 00000000..a525bfbf
--- /dev/null
+++ b/supabase/migrations/00039_add_content_type.sql
@@ -0,0 +1,6 @@
+-- Add content_type column to storylines (fiction | cartoon)
+ALTER TABLE storylines
+ ADD COLUMN content_type text NOT NULL DEFAULT 'fiction';
+
+ALTER TABLE storylines
+ ADD CONSTRAINT storylines_content_type_check CHECK (content_type IN ('fiction', 'cartoon'));