Fix SSR hydration issues and finalize deployment config
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user