From af87cc87f7319243cf42b87780f8eed26712d038 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sat, 2 Mar 2024 20:23:06 +0000 Subject: ui: Preload the sidebar lists to avoid the spinner --- packages/web/app/dashboard/components/Sidebar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/web/app/dashboard/components/Sidebar.tsx') diff --git a/packages/web/app/dashboard/components/Sidebar.tsx b/packages/web/app/dashboard/components/Sidebar.tsx index c6282a6b..a5c1d7a5 100644 --- a/packages/web/app/dashboard/components/Sidebar.tsx +++ b/packages/web/app/dashboard/components/Sidebar.tsx @@ -7,6 +7,7 @@ import SidebarProfileOptions from "./SidebarProfileOptions"; import { Separator } from "@/components/ui/separator"; import AllLists from "./AllLists"; import serverConfig from "@hoarder/shared/config"; +import { api } from "@/server/api/client"; export default async function Sidebar() { const session = await getServerAuthSession(); @@ -14,6 +15,8 @@ export default async function Sidebar() { redirect("/"); } + const lists = await api.lists.list(); + return (