Merge branch 'front/dynamic-zones-ctm-ui' of github.com:strapi/strapi into front/dynamic-zones-ctm-ui

This commit is contained in:
Aurélien Georget 2019-11-28 15:58:23 +01:00
commit 8ca8d9bbc9
2 changed files with 5 additions and 11 deletions

View File

@ -1,16 +1,14 @@
import React, { useState } from 'react';
import { withRouter } from 'react-router-dom';
import { useHistory } from 'react-router-dom';
import PropTypes from 'prop-types';
import pluginId from '../../pluginId';
import DynamicComponentCard from '../DynamicComponentCard';
import Tooltip from './Tooltip';
const DynamicComponent = ({
componentUid,
history: { push },
setIsOverDynamicZone,
}) => {
const DynamicComponent = ({ componentUid, setIsOverDynamicZone }) => {
const [state, setState] = useState(false);
const { push } = useHistory();
const handleMouseEvent = () => {
setIsOverDynamicZone(v => !v);
setState(v => !v);
@ -35,10 +33,7 @@ const DynamicComponent = ({
DynamicComponent.propTypes = {
componentUid: PropTypes.string.isRequired,
history: PropTypes.shape({
push: PropTypes.func.isRequired,
}),
setIsOverDynamicZone: PropTypes.func.isRequired,
};
export default withRouter(DynamicComponent);
export default DynamicComponent;

View File

@ -1,5 +1,4 @@
import React, { useCallback, useState } from 'react';
import { get } from 'lodash';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';