fix(ui) - graphql crash

This commit is contained in:
Shekar Siri 2023-03-03 14:24:07 +01:00
parent 598eafad8b
commit 270b150f88

View file

@ -12,29 +12,8 @@ function renderDefaultStatus() {
return '2xx-3xx';
}
export function renderName(r: Record<string, any>) {
const { player } = React.useContext(PlayerContext);
return (
<div className="flex justify-between items-center grow-0 w-full">
<div>{r.operationName}</div>
<Button
variant="text"
className="right-0 text-xs uppercase p-2 color-gray-500 hover:color-teal"
onClick={(e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
player.jump(r.time);
}}
>
Jump
</Button>
</div>
);
}
function GraphQL() {
const { player, store } = React.useContext(PlayerContext);
const { graphqlList: list, graphqlListNow: listNow, time, livePlay } = store.get();
const defaultState = {
@ -52,6 +31,24 @@ function GraphQL() {
const [state, setState] = React.useState(defaultState);
function renderName(r: Record<string, any>) {
return (
<div className="flex justify-between items-center grow-0 w-full">
<div>{r.operationName}</div>
<Button
variant="text"
className="right-0 text-xs uppercase p-2 color-gray-500 hover:color-teal"
onClick={(e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
player.jump(r.time);
}}
>
Jump
</Button>
</div>
);
}
const filterList = (list: any, value: string) => {
const filterRE = getRE(value, 'i');