Skip to content

Commit 7fe4f2c

Browse files
authored
fix: restore change detection in query pane (#318)
1 parent fb43e61 commit 7fe4f2c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/components/Playground.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Playground() {
4848
</div>
4949
</div>
5050

51-
<PlaygroundPanels />
51+
<PlaygroundPanels state={state} dispatch={dispatch} />
5252
</div>
5353
</Layout>
5454
);

src/components/PlaygroundPanels.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import React, { Suspense } from 'react';
22
import { useState } from 'react';
3-
import { useParams } from 'react-router-dom';
4-
5-
import usePlayground from '../hooks/usePlayground';
63

74
import Query from './Query';
85
import Result from './Result';
@@ -20,9 +17,7 @@ function Paper({ children }) {
2017
);
2118
}
2219

23-
function PlaygroundPanels() {
24-
const { gistId, gistVersion } = useParams();
25-
const [state, dispatch] = usePlayground({ gistId, gistVersion });
20+
function PlaygroundPanels({ state, dispatch }) {
2621
const { query, result } = state;
2722
const [panel, setPanel] = useState(panels[0]);
2823

0 commit comments

Comments
 (0)