Skip to content

Commit 5dbfe96

Browse files
committed
feat(ui): add tanstack query, client
1 parent e7c8501 commit 5dbfe96

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

package-lock.json

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@patternfly/react-component-groups": "^6.2.0",
99
"@patternfly/react-core": "^6.2.0",
1010
"@patternfly/react-table": "^6.2.0",
11+
"@tanstack/react-query": "^5.80.7",
1112
"dayjs": "^1.11.13",
1213
"victory": "^37.3.6"
1314
},

src/app/index.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
import * as React from 'react';
21
import '@patternfly/react-core/dist/styles/base.css';
32
import { BrowserRouter as Router } from 'react-router-dom';
4-
53
import { AppLayout } from '@app/AppLayout/AppLayout';
64
import { AppRoutes } from '@app/routes';
75
import '@app/app.css';
6+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
7+
8+
const queryClient = new QueryClient();
89

9-
const App: React.FunctionComponent = () => (
10-
<Router>
11-
<AppLayout>
12-
<AppRoutes />
13-
</AppLayout>
14-
</Router>
10+
const App = () => (
11+
<QueryClientProvider client={queryClient}>
12+
<Router>
13+
<AppLayout>
14+
<AppRoutes />
15+
</AppLayout>
16+
</Router>
17+
</QueryClientProvider>
1518
);
1619

1720
export default App;

0 commit comments

Comments
 (0)