Skip to content

Commit

Permalink
don't refetch serial console on focus. fixes #1001
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Jun 29, 2022
1 parent be328b3 commit 37c7c40
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions app/pages/project/instances/instance/SerialConsolePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ export function SerialConsolePage() {
'instanceName'
)

const { data, refetch } = useApiQuery('projectInstancesInstanceSerialGet', {
maxBytes: 10 * MiB,
fromStart: 0,
orgName,
projectName,
instanceName,
})
const { data, refetch } = useApiQuery(
'projectInstancesInstanceSerialGet',
{
maxBytes: 10 * MiB,
fromStart: 0,
orgName,
projectName,
instanceName,
},
{ refetchOnWindowFocus: false }
)

return (
<>
Expand Down
18 changes: 11 additions & 7 deletions app/pages/project/instances/instance/tabs/SerialConsoleTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ export function SerialConsoleTab() {
'instanceName'
)

const { data, refetch } = useApiQuery('projectInstancesInstanceSerialGet', {
maxBytes: 10 * MiB,
fromStart: 0,
orgName,
projectName,
instanceName,
})
const { data, refetch } = useApiQuery(
'projectInstancesInstanceSerialGet',
{
maxBytes: 10 * MiB,
fromStart: 0,
orgName,
projectName,
instanceName,
},
{ refetchOnWindowFocus: false }
)

return (
<>
Expand Down

1 comment on commit 37c7c40

@vercel
Copy link

@vercel vercel bot commented on 37c7c40 Jun 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.