Skip to content

Commit d2dc249

Browse files
ci: apply automated fixes
1 parent d2d18da commit d2dc249

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

examples/react/basic/src/index.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import { createRoot } from 'react-dom/client'
2-
import { QueryClient, QueryClientProvider, useQuery, useQueryClient } from '@tanstack/react-query'
2+
import {
3+
QueryClient,
4+
QueryClientProvider,
5+
useQuery,
6+
useQueryClient,
7+
} from '@tanstack/react-query'
38
import { useState } from 'react'
49
import Devtools from './setup'
510

6-
711
const queryClient = new QueryClient({
812
defaultOptions: {
913
queries: {
@@ -47,9 +51,9 @@ function Posts({
4751
// ones that are cached
4852
queryClient.getQueryData(['post', post.id])
4953
? {
50-
fontWeight: 'bold',
51-
color: 'green',
52-
}
54+
fontWeight: 'bold',
55+
color: 'green',
56+
}
5357
: {}
5458
}
5559
>
@@ -127,14 +131,12 @@ function App() {
127131

128132
return (
129133
<div>
130-
<QueryClientProvider
131-
client={queryClient}
132-
>
134+
<QueryClientProvider client={queryClient}>
133135
<p>
134136
As you visit the posts below, you will notice them in a loading state
135-
the first time you load them. However, after you return to this list and
136-
click on any posts you have already visited again, you will see them
137-
load instantly and background refresh right before your eyes!{' '}
137+
the first time you load them. However, after you return to this list
138+
and click on any posts you have already visited again, you will see
139+
them load instantly and background refresh right before your eyes!{' '}
138140
<strong>
139141
(You may need to throttle your network speed to simulate longer
140142
loading sequences)

examples/react/basic/src/setup.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
32
import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
43
import {
@@ -57,7 +56,6 @@ const routeTree = rootRoute.addChildren([indexRoute, aboutRoute])
5756

5857
const router = createRouter({ routeTree })
5958

60-
6159
export default function DevtoolsExample() {
6260
return (
6361
<>
@@ -74,7 +72,6 @@ export default function DevtoolsExample() {
7472
]}
7573
/>
7674
<RouterProvider router={router} />
77-
7875
</>
7976
)
8077
}

packages/devtools/src/hooks/detached/use-check-if-still-detached.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ export const useCheckIfStillDetached = () => {
1515
const context = useDevtoolsContext()
1616

1717
const checkDetachment = (e: StorageEvent) => {
18-
19-
const isWindowOwner = getBooleanFromSession(TANSTACK_DEVTOOLS_DETACHED_OWNER)
18+
const isWindowOwner = getBooleanFromSession(
19+
TANSTACK_DEVTOOLS_DETACHED_OWNER,
20+
)
2021
// close the window if the main panel closed it via trigger
21-
if (e.key === TANSTACK_DEVTOOLS_IS_DETACHED && e.newValue === "false" && !isWindowOwner) {
22+
if (
23+
e.key === TANSTACK_DEVTOOLS_IS_DETACHED &&
24+
e.newValue === 'false' &&
25+
!isWindowOwner
26+
) {
2227
window.close()
2328
}
2429
// We only care about the should_check key

0 commit comments

Comments
 (0)