diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index 88505900a..fa6ba6a14 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -1,17 +1,23 @@ import React from 'react'; import CodeEditor from 'components/CodeEditor'; import { useTheme } from 'providers/Theme'; +import { useDispatch } from 'react-redux'; +import { sendRequest } from 'providers/ReduxStore/slices/collections/actions'; + import StyledWrapper from './StyledWrapper'; -const QueryResult = ({ value, width }) => { +const QueryResult = ({ item, collection, value, width }) => { const { storedTheme } = useTheme(); + const dispatch = useDispatch(); + + const onRun = () => dispatch(sendRequest(item, collection.uid)); return (
- +
); diff --git a/packages/bruno-app/src/components/ResponsePane/index.js b/packages/bruno-app/src/components/ResponsePane/index.js index b41578dc1..bf682088d 100644 --- a/packages/bruno-app/src/components/ResponsePane/index.js +++ b/packages/bruno-app/src/components/ResponsePane/index.js @@ -33,7 +33,12 @@ const ResponsePane = ({ rightPaneWidth, item, collection }) => { const getTabPanel = (tab) => { switch (tab) { case 'response': { - return ; + return ; } case 'headers': { return ;