diff --git a/.changeset/thirty-mammals-live.md b/.changeset/thirty-mammals-live.md new file mode 100644 index 000000000000..0d540a9ff013 --- /dev/null +++ b/.changeset/thirty-mammals-live.md @@ -0,0 +1,7 @@ +--- +"@cloudflare/local-explorer-ui": patch +--- + +Refactors KV & sidebar to use route loaders. + +This change improves the user experience of the Local Explorer dashboard by ensuring that the data used for the initial render is fetched server-side and passed down to the client. This avoids the initial flicker when loading in. Both D1 & Durable Object routes already incorporate this system. diff --git a/packages/local-explorer-ui/src/components/Sidebar.tsx b/packages/local-explorer-ui/src/components/Sidebar.tsx index 3c6025c7dfa9..830f1c38e51f 100644 --- a/packages/local-explorer-ui/src/components/Sidebar.tsx +++ b/packages/local-explorer-ui/src/components/Sidebar.tsx @@ -26,7 +26,6 @@ interface SidebarItemGroupProps { to: FileRouteTypes["to"]; }; }>; - loading: boolean; title: string; } @@ -35,7 +34,6 @@ function SidebarItemGroup({ error, icon: Icon, items, - loading, title, }: SidebarItemGroupProps): JSX.Element { return ( @@ -51,17 +49,11 @@ function SidebarItemGroup({