import React from 'react'; import get from 'lodash/get'; import { useDispatch } from 'react-redux'; import CodeEditor from 'components/CodeEditor'; import { updateCollectionTests } from 'providers/ReduxStore/slices/collections'; import { saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions'; import { useTheme } from 'providers/Theme'; import StyledWrapper from './StyledWrapper'; const Tests = ({ collection }) => { const dispatch = useDispatch(); const tests = get(collection, 'root.request.tests', ''); const { storedTheme } = useTheme(); const onEdit = (value) => { dispatch( updateCollectionTests({ tests: value, collectionUid: collection.uid }) ); }; const handleSave = () => dispatch(saveCollectionRoot(collection.uid)); return (
); }; export default Tests;