diff --git a/prisma/dev.db b/prisma/dev.db
index a84c5be..631ea8b 100644
Binary files a/prisma/dev.db and b/prisma/dev.db differ
diff --git a/src/app/story/[id]/page.tsx b/src/app/story/[id]/page.tsx
index 6630fa7..d8992e7 100644
--- a/src/app/story/[id]/page.tsx
+++ b/src/app/story/[id]/page.tsx
@@ -1,15 +1,42 @@
// "use server"
import prisma from "app/lib/db"
+import { columns } from "app/submission/columns"
+import { PageHeader, PageSubHeader } from "app/ui/pageHeader"
+import { DataTable } from "app/ui/tables/data-table"
+import { Badge } from "@/components/ui/badge"
-async function getStory(id: string) {
- const story = await prisma.story.findFirst({ where: { id: Number(id) } })
- return story
+//ids are string here because they're coming from url params
+async function getStoryWithGenres(id: string) {
+ return prisma.story.findFirst({
+ where: { id: Number(id) }, include: {
+ genres: true
+ }
+ })
+}
+async function getStorySubmissions(id: string) {
+ return prisma.sub.findMany({
+ where: { storyId: Number(id) }, include: {
+ story: true,
+ pub: true,
+ response: true
+ }
+ })
}
export default async function Page({ params }: { params: { id: string } }) {
- const data = await getStory(params.id)
- return
Title: {data?.title ?? ""}
+ const data = await getStoryWithGenres(params.id)
+ const storySubs = await getStorySubmissions(params.id)
+ return <>
+
+
{data?.title ?? ""}
+ {data.genres.map(e => (
{e.name}))}
+
Submissions:
+
+
+
+
+ >
}
diff --git a/src/app/tailwind.css b/src/app/tailwind.css
index 83babc0..f2f82c5 100644
--- a/src/app/tailwind.css
+++ b/src/app/tailwind.css
@@ -46,7 +46,7 @@ html,
-o-tab-size: 4;
tab-size: 4;
/* 3 */
- font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+ font-family: ui-sans-serif, system-ui;
/* 4 */
font-feature-settings: normal;
/* 5 */
@@ -135,7 +135,7 @@ code,
kbd,
samp,
pre {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ font-family: ui-monospace, SFMono-Regular;
/* 1 */
font-feature-settings: normal;
/* 2 */
@@ -1248,6 +1248,10 @@ body {
vertical-align: middle;
}
+.font-display {
+ font-family: Playfair;
+}
+
.text-3xl {
font-size: 1.875rem;
line-height: 2.25rem;
@@ -1277,6 +1281,11 @@ body {
line-height: 1rem;
}
+.text-xl {
+ font-size: 1.25rem;
+ line-height: 1.75rem;
+}
+
.font-black {
font-weight: 900;
}
@@ -1293,6 +1302,10 @@ body {
font-weight: 600;
}
+.font-bold {
+ font-weight: 700;
+}
+
.capitalize {
text-transform: capitalize;
}
diff --git a/src/app/ui/pageHeader.tsx b/src/app/ui/pageHeader.tsx
new file mode 100644
index 0000000..21c35ce
--- /dev/null
+++ b/src/app/ui/pageHeader.tsx
@@ -0,0 +1,9 @@
+import { ComponentProps } from "react"
+
+export function PageHeader(props: ComponentProps<"h1">) {
+ return {props.children}
+}
+
+export function PageSubHeader(props: ComponentProps<"h2">) {
+ return {props.children}
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index 7cb7e37..a310c9f 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -2,13 +2,20 @@
module.exports = {
darkMode: ["class"],
content: [
- './pages/**/*.{ts,tsx}',
- './components/**/*.{ts,tsx}',
- './app/**/*.{ts,tsx}',
- './src/**/*.{ts,tsx}',
+ "./pages/**/*.{ts,tsx}",
+ "./components/**/*.{ts,tsx}",
+ "./app/**/*.{ts,tsx}",
+ "./src/**/*.{ts,tsx}",
],
prefix: "",
theme: {
+ fontFamily: {
+ sans: ["ui-sans-serif", "system-ui"],
+ serif: ["ui-serif", "Georgia"],
+ mono: ["ui-monospace", "SFMono-Regular"],
+ display: ["Playfair"],
+ body: ['"Open Sans"'],
+ },
container: {
center: true,
padding: "2rem",
@@ -74,4 +81,5 @@ module.exports = {
},
},
plugins: [require("tailwindcss-animate")],
-}
\ No newline at end of file
+};
+