add fetched data to story table
This commit is contained in:
parent
a8f68ff737
commit
f3472d2a55
|
@ -1,116 +1,8 @@
|
||||||
import { Story } from "@prisma/client";
|
import { Story } from "@prisma/client";
|
||||||
import { DataTable } from "./data-table";
|
import { DataTable } from "./data-table";
|
||||||
import { columns } from "./columns";
|
import { columns } from "./columns";
|
||||||
const stories: Story[] = [
|
import { getStories } from "app/lib/get";
|
||||||
{
|
const stories: Story[] = await getStories()
|
||||||
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,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto py-10">
|
<div className="container mx-auto py-10">
|
||||||
|
|
Loading…
Reference in New Issue