Skip to content

Commit df340c1

Browse files
committed
Add react-query devtool to story
1 parent 8e0dd05 commit df340c1

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

packages/ra-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
},
2929
"devDependencies": {
3030
"@hookform/resolvers": "^3.2.0",
31+
"@tanstack/react-query-devtools": "^5.21.7",
3132
"@testing-library/react": "^15.0.7",
3233
"@types/jest": "^29.5.2",
3334
"@types/jscodeshift": "^0.11.11",

packages/ra-core/src/auth/CanAccess.stories.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { AuthProvider } from '../types';
55
import { CoreAdminContext } from '../core/CoreAdminContext';
66
import { CanAccess } from './CanAccess';
77
import { TestMemoryRouter } from '../routing/TestMemoryRouter';
8+
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
89

910
export default {
1011
title: 'ra-core/auth/CanAccess',
@@ -147,6 +148,10 @@ export const ManyCalls = ({
147148
<div>{post.title}</div>
148149
</CanAccess>
149150
))}
151+
<ReactQueryDevtools
152+
initialIsOpen={false}
153+
buttonPosition="bottom-right"
154+
/>
150155
</div>
151156
</CoreAdminContext>
152157
</TestMemoryRouter>

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16028,6 +16028,7 @@ __metadata:
1602816028
dependencies:
1602916029
"@hookform/resolvers": "npm:^3.2.0"
1603016030
"@tanstack/react-query": "npm:^5.21.7"
16031+
"@tanstack/react-query-devtools": "npm:^5.21.7"
1603116032
"@testing-library/react": "npm:^15.0.7"
1603216033
"@types/jest": "npm:^29.5.2"
1603316034
"@types/jscodeshift": "npm:^0.11.11"

0 commit comments

Comments
 (0)