From 33d84bac7f5e67b31de3d6faff98e792b451d896 Mon Sep 17 00:00:00 2001
From: Xiang Xu
Date: Mon, 12 Aug 2024 10:12:23 -0700
Subject: [PATCH] [ui] fix schema browser not subscribing to query client
(unitycatalog/unitycatalog-ui#64)
---
ui/src/App.tsx | 159 ++++++++++++++++++++++---------------------------
1 file changed, 72 insertions(+), 87 deletions(-)
diff --git a/ui/src/App.tsx b/ui/src/App.tsx
index 3f1418322..8a2540227 100644
--- a/ui/src/App.tsx
+++ b/ui/src/App.tsx
@@ -23,39 +23,27 @@ const router = createBrowserRouter([
children: [
{
path: '/',
- Component() {
- return ;
- },
+ element: ,
},
{
path: '/data/:catalog',
- Component() {
- return ;
- },
+ element: ,
},
{
path: '/data/:catalog/:schema',
- Component() {
- return ;
- },
+ element: ,
},
{
path: '/data/:catalog/:schema/:table',
- Component() {
- return ;
- },
+ element: ,
},
{
path: '/volumes/:catalog/:schema/:volume',
- Component() {
- return ;
- },
+ element: ,
},
{
path: '/functions/:catalog/:schema/:ucFunction',
- Component() {
- return ;
- },
+ element: ,
},
],
},
@@ -63,88 +51,85 @@ const router = createBrowserRouter([
function AppProvider() {
const navigate = useNavigate();
- const queryClient = new QueryClient({
- defaultOptions: { queries: { staleTime: 1000 * 5 * 60 } },
- });
return (
-
-
-
- {/* Header */}
-
- navigate('/')}>
-
-
-
- {/* Content */}
-
+
+ {/* Header */}
+
+ navigate('/')}>
+
+
+
+ {/* Content */}
+
+ {/* Left: Schema Browser */}
+
- {/* Left: Schema Browser */}
-
-
-
+
+
- {/* Right: Main details content */}
-
-
-
-
-
-
-
+ {/* Right: Main details content */}
+
+
+
+
+
+
);
}
function App() {
+ const queryClient = new QueryClient({
+ defaultOptions: { queries: { staleTime: 1000 * 5 * 60 } },
+ });
+
return (
- Loading...
} />
+
+ Loading...} />
+
);
}