mirror of
https://github.com/Nezumi-2711/next-gdrive-index.git
synced 2026-09-22 13:38:38 +00:00
Fix file retrieval and readme loading in RootPage
This commit is contained in:
@@ -336,6 +336,7 @@ export async function GetFiles({
|
||||
let decryptedId: string | undefined;
|
||||
if (id) decryptedId = await decryptData(id);
|
||||
else decryptedId = await decryptData(config.apiConfig.rootFolder);
|
||||
|
||||
const filterName = config.apiConfig.hiddenFiles
|
||||
.map((item) => `not name = '${item}'`)
|
||||
.join(" and ");
|
||||
|
||||
+5
-7
@@ -7,18 +7,16 @@ import FileBrowser from "./@explorer";
|
||||
import Header from "./@header";
|
||||
import HeaderButton from "./@header.button";
|
||||
import Markdown from "./@markdown";
|
||||
import { GetFiles } from "./actions";
|
||||
import { GetFiles, GetReadme } from "./actions";
|
||||
|
||||
export const revalidate = 300;
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function RootPage() {
|
||||
const data = await GetFiles({});
|
||||
const readme = "";
|
||||
// const [data, readme] = await Promise.all([
|
||||
// GetFiles({}),
|
||||
// GetReadme(undefined),
|
||||
// ]);
|
||||
const [data, readme] = await Promise.all([
|
||||
GetFiles({}),
|
||||
GetReadme(undefined),
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className={cn("h-fit w-full", "flex flex-col gap-3")}>
|
||||
|
||||
Reference in New Issue
Block a user