diff --git a/package.json b/package.json index 119c35b8..367cedef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink", - "version": "0.1.6", + "version": "0.1.7", "private": true, "workspaces": [ "packages/*" diff --git a/src/components/StoryCard.tsx b/src/components/StoryCard.tsx index e201c565..6d13c9e7 100644 --- a/src/components/StoryCard.tsx +++ b/src/components/StoryCard.tsx @@ -24,14 +24,10 @@ export function StoryCard({ return (
-
- {/* Stretched link — makes the whole card clickable */} - - + {/* Page underneath — revealed when cover opens */}
- {/* Top area: genre + plot count badges */} + {/* Top: genre badge */}
{displayGenre || "Uncategorized"} - - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - - {isNew && ( - - NEW - - )} {storyline.sunset && ( complete @@ -109,18 +97,28 @@ export function StoryCard({ )}
- {/* Bottom: author name inside cover — z-40 so profile link sits above card link */} -
- - - {storyline.writer_type === 1 && } - + {/* Bottom: plot count + NEW badges */} +
+
+ + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + + {isNew && ( + + NEW + + )} +
-
+ - {/* Metadata below notebook */} + {/* Metadata below notebook: author → TVL → rating */}
+ + + {storyline.writer_type === 1 && } + {storyline.token_address && ( diff --git a/src/components/__tests__/StoryCard.test.tsx b/src/components/__tests__/StoryCard.test.tsx index 7073f349..2301b088 100644 --- a/src/components/__tests__/StoryCard.test.tsx +++ b/src/components/__tests__/StoryCard.test.tsx @@ -69,14 +69,14 @@ describe("StoryCard", () => { it("links to correct story page", () => { render(); - const link = screen.getByRole("link", { name: "Test Story Title" }); + const link = screen.getAllByText("Test Story Title")[0].closest("a"); expect(link).toHaveAttribute("href", "/story/42"); }); it("applies moleskine-notebook class for hover animation", () => { render(); - const container = screen.getAllByText("Test Story Title")[0].closest(".moleskine-notebook"); - expect(container).toBeTruthy(); + const link = screen.getAllByText("Test Story Title")[0].closest("a"); + expect(link).toHaveClass("moleskine-notebook"); }); it("shows plot count", () => {