feat: 去除访问统计信息

This commit is contained in:
2026-07-22 17:27:36 +08:00
parent aa4f3389a3
commit c9d6ce3464
7 changed files with 43 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
---
import Layout from "@/layouts/Layout.astro";
import IndexView from "@/components/IndexView.astro";
import type { Post, CategoriesStats } from "@/types/post";
import type { Post } from "@/types/post";
import { createHttp } from "@/lib/request";
import { metadata } from "@/consts.ts";
@@ -14,14 +14,10 @@ const { list, total } = await http.get<ApiPageResponse<Post>>("post", {
},
});
const totalPage = Math.ceil(total / metadata.postPageSize);
const { data: categories } =
await http.get<ApiResponse<CategoriesStats[]>>("category/stats");
---
<Layout>
<IndexView
categories={categories}
posts={list}
page={1}
totalPage={totalPage}