test root page without data

This commit is contained in:
mbaharip
2024-04-06 23:39:14 +07:00
parent 49f9b3977b
commit f6942f98f1
+14 -5
View File
@@ -1,3 +1,5 @@
import { z } from "zod";
import { Schema_File } from "~/schema";
import { cn } from "~/utils"; import { cn } from "~/utils";
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
@@ -7,16 +9,23 @@ import FileBrowser from "./@explorer";
import Header from "./@header"; import Header from "./@header";
import HeaderButton from "./@header.button"; import HeaderButton from "./@header.button";
import Markdown from "./@markdown"; import Markdown from "./@markdown";
import { GetFiles, GetReadme } from "./actions";
export const revalidate = 300; export const revalidate = 300;
export const dynamic = "force-dynamic"; export const dynamic = "force-dynamic";
export default async function RootPage() { export default async function RootPage() {
const [data, readme] = await Promise.all([ const data: {
GetFiles({}), files: z.infer<typeof Schema_File>[];
GetReadme(undefined), nextPageToken: string | undefined;
]); } = {
files: [],
nextPageToken: undefined,
};
const readme = "";
// const [data, readme] = await Promise.all([
// GetFiles({}),
// GetReadme(undefined),
// ]);
return ( return (
<div className={cn("h-fit w-full", "flex flex-col gap-3")}> <div className={cn("h-fit w-full", "flex flex-col gap-3")}>