Fix SSR hydration issues and finalize deployment config
Some checks failed
Deploy Documentation Site / build (push) Has been cancelled
Deploy Documentation Site / deploy (push) Has been cancelled

This commit is contained in:
hjdave
2026-04-04 16:59:37 +08:00
parent d6db7a3eef
commit ec9f4bbf02
6 changed files with 540 additions and 335 deletions

View File

@@ -42,10 +42,7 @@ export async function getClient(): Promise<PoolClient> {
const client = await getPool().connect();
const release = () => client.release();
return {
...client,
release,
};
return client as PoolClient & { release: () => void };
}
// 初始化数据库表
@@ -213,7 +210,7 @@ export async function getDocs(): Promise<any[]> {
ORDER BY d.created_at DESC
`
);
return result.rows.map((row) => ({
return result.rows.map((row: any) => ({
title: row.title,
slug: row.slug,
description: row.description,