Skip to content

Commit

Permalink
refactor: Fix issues identified by Sonarqube Refs #254220
Browse files Browse the repository at this point in the history
  • Loading branch information
dana-cfc4 committed Jun 15, 2023
1 parent 3c08e80 commit cb9a81f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
13 changes: 8 additions & 5 deletions src/ColumnsBlock/ColumnsBlockEdit.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import React from 'react';
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
import { compose } from 'redux';
import { Grid, Segment } from 'semantic-ui-react';
import { Grid, Segment, Button } from 'semantic-ui-react';
import { isEmpty, without } from 'lodash';
import { SidebarPortal, BlocksToolbar, Icon } from '@plone/volto/components'; // BlocksForm, Icon,
import { BlockDataForm } from '@plone/volto/components';
import {
SidebarPortal,
BlocksToolbar,
Icon,
BlockDataForm,
BlocksForm,
} from '@plone/volto/components'; // BlocksForm, Icon,
import {
emptyBlocksForm,
getBlocksLayoutFieldname,
} from '@plone/volto/helpers';
import { setSidebarTab } from '@plone/volto/actions';
import { connect } from 'react-redux';
import { BlocksForm } from '@plone/volto/components';
import { Button } from 'semantic-ui-react';
import config from '@plone/volto/registry';
import cx from 'classnames';

Expand Down
1 change: 0 additions & 1 deletion src/ColumnsBlock/ColumnsBlockView.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
// import renderer from 'react-test-renderer';
import configureStore from 'redux-mock-store';
import { Provider } from 'react-intl-redux';
import config from '@plone/volto/registry';
Expand Down
1 change: 0 additions & 1 deletion src/ColumnsBlock/EditBlockWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class EditBlockWrapper extends React.Component {
}

componentDidMount() {
// console.log('mount editblockwrapper', this.props.blockProps.block);
document.addEventListener('mousedown', this.handleClickOutside, false);
}

Expand Down
3 changes: 1 addition & 2 deletions src/Widgets/ColumnsWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { FormattedMessage } from 'react-intl';
import { v4 as uuid } from 'uuid';
import { omit, without } from 'lodash';
import move from 'lodash-move';
import { Icon, FormFieldWrapper } from '@plone/volto/components';
import { DragDropList } from '@plone/volto/components';
import { Icon, FormFieldWrapper, DragDropList } from '@plone/volto/components';
import { emptyBlocksForm } from '@plone/volto/helpers';

import dragSVG from '@plone/volto/icons/drag.svg';
Expand Down
1 change: 0 additions & 1 deletion src/Widgets/Slider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ const SliderWidget = (props) => {
settings={{
...settings,
onChange: (value) => {
// console.log('onchange', value);
onChange(id, value);
},
}}
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export default function install(config) {
tocEntry: (block = {}, tocData) => {
// integration with volto-block-toc
const headlines = tocData.levels || ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
// const column_blocks = block?.data?.blocks || {};
let entries = [];
const sorted_column_blocks = getBlocks(block?.data || {});
sorted_column_blocks.forEach((column_block) => {
Expand Down
1 change: 0 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import config from '@plone/volto/registry';

const columnConfig = {
cloneData(blockData) {
// console.log('column', blockData);
return cloneFormData(blockData);
},
};
Expand Down

0 comments on commit cb9a81f

Please sign in to comment.