diff --git a/src/assets/icon/client.png b/src/assets/icon/client.png new file mode 100644 index 0000000..da01127 Binary files /dev/null and b/src/assets/icon/client.png differ diff --git a/src/components/IndexSidebar.astro b/src/components/IndexSidebar.astro index 12b9102..8bea72d 100644 --- a/src/components/IndexSidebar.astro +++ b/src/components/IndexSidebar.astro @@ -1,23 +1,25 @@ --- import Folder from "@/assets/icon/folder.png?url"; -import type {CategoriesStats} from "@/types"; +import type { CategoriesStats } from "@/types"; +import { createHttp } from "@/lib/request"; +const http = createHttp(Astro.request.headers); -interface Props { - categories: CategoriesStats[] -} -const {categories} = Astro.props +const { data: categories } = + await http.get>("category/stats"); --- +