mirror of
https://github.com/graphql-hive/console
synced 2026-05-23 17:18:23 +00:00
Remember selected date range when switching between Insights pages (#4886)
This commit is contained in:
parent
b42855a008
commit
24d0e76133
2 changed files with 16 additions and 0 deletions
|
|
@ -566,6 +566,14 @@ function ClientsStats(props: {
|
|||
targetId: props.targetId,
|
||||
name: ev.value,
|
||||
},
|
||||
search(searchParams) {
|
||||
if ('from' in searchParams && 'to' in searchParams) {
|
||||
return {
|
||||
from: searchParams.from,
|
||||
to: searchParams.to,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -280,6 +280,14 @@ function ClientView(props: {
|
|||
operationName: operation.name,
|
||||
operationHash: operation.operationHash ?? '_',
|
||||
}}
|
||||
search={searchParams => {
|
||||
if ('from' in searchParams && 'to' in searchParams) {
|
||||
return {
|
||||
from: searchParams.from,
|
||||
to: searchParams.to,
|
||||
};
|
||||
}
|
||||
}}
|
||||
>
|
||||
{operation.name}
|
||||
</Link>
|
||||
|
|
|
|||
Loading…
Reference in a new issue