Skip to content

Commit

Permalink
fix: restore change detection in query pane (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
delca85 committed Dec 8, 2020
1 parent fb43e61 commit 7fe4f2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Playground() {
</div>
</div>

<PlaygroundPanels />
<PlaygroundPanels state={state} dispatch={dispatch} />
</div>
</Layout>
);
Expand Down
7 changes: 1 addition & 6 deletions src/components/PlaygroundPanels.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import React, { Suspense } from 'react';
import { useState } from 'react';
import { useParams } from 'react-router-dom';

import usePlayground from '../hooks/usePlayground';

import Query from './Query';
import Result from './Result';
Expand All @@ -20,9 +17,7 @@ function Paper({ children }) {
);
}

function PlaygroundPanels() {
const { gistId, gistVersion } = useParams();
const [state, dispatch] = usePlayground({ gistId, gistVersion });
function PlaygroundPanels({ state, dispatch }) {
const { query, result } = state;
const [panel, setPanel] = useState(panels[0]);

Expand Down

0 comments on commit 7fe4f2c

Please sign in to comment.