From b5b8d8ad094b760591666dc17f43777d9ea2c9ea Mon Sep 17 00:00:00 2001 From: andrzej Date: Wed, 19 Jun 2024 11:33:53 +0200 Subject: [PATCH] add fetched data to story table --- src/app/story/page.tsx | 112 +---------------------------------------- 1 file changed, 2 insertions(+), 110 deletions(-) diff --git a/src/app/story/page.tsx b/src/app/story/page.tsx index 5cf263a..7cb6a16 100644 --- a/src/app/story/page.tsx +++ b/src/app/story/page.tsx @@ -1,116 +1,8 @@ import { Story } from "@prisma/client"; import { DataTable } from "./data-table"; import { columns } from "./columns"; -const stories: Story[] = [ - { - id: 0, - word_count: 500, - title: "Space Vampire", - deleted: 0, - }, - { - id: 1, - word_count: 500, - title: "Ghost Astronaut", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Elf", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Space Orcs", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Space Orcs", - deleted: 0, - }, - { - id: 0, - word_count: 500, - title: "Space Vampire", - deleted: 0, - }, - { - id: 1, - word_count: 500, - title: "Ghost Astronaut", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Elf", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Space Orcs", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Space Orcs", - deleted: 0, - }, - { - id: 0, - word_count: 500, - title: "Space Vampire", - deleted: 0, - }, - { - id: 1, - word_count: 500, - title: "Ghost Astronaut", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Elf", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Space Orcs", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Space Orcs", - deleted: 0, - }, - { - id: 0, - word_count: 500, - title: "Space Vampire", - deleted: 0, - }, - { - id: 1, - word_count: 500, - title: "Ghost Astronaut", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Elf", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Space Orcs", - deleted: 0, - }, { - id: 1, - word_count: 500, - title: "Spooky Space Orcs And Gandalf Too", - deleted: 0, - }, -] +import { getStories } from "app/lib/get"; +const stories: Story[] = await getStories() export default async function Page() { return (