Skip to content

Commit

Permalink
Change imports from volto core
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Sep 25, 2020
1 parent 0d5d313 commit d1dcc14
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
18 changes: 14 additions & 4 deletions src/components/manage/Blocks/Group/Edit.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import React from 'react';
import { useState } from 'react';
import { isEmpty } from 'lodash';
import { BlocksForm } from '@eeacms/volto-blocks-form/components';
import { emptyBlocksForm } from '@eeacms/volto-blocks-form/helpers';
import { BlocksForm } from '@plone/volto/components';
import { emptyBlocksForm } from '@plone/volto/helpers';
import './editor.less';

const Edit = (props) => {
const { block, data, onChangeBlock, pathname, selected, manage } = props;
const {
block,
data,
onChangeBlock,
onSelectBlock,
pathname,
selected,
manage,
} = props;

const properties = isEmpty(data?.data?.blocks)
? emptyBlocksForm()
Expand All @@ -23,7 +31,9 @@ const Edit = (props) => {
allowedBlocks={data.allowedBlocks}
title={data.placeholder}
description={data?.instructions?.data}
onSelectBlock={(id) => setSelectedBlock(id)}
onSelectBlock={(id) => {
setSelectedBlock(id);
}}
onChangeFormData={(newFormData) => {
onChangeBlock(block, {
...data,
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/Blocks/Group/View.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { RenderBlocks } from '@eeacms/volto-blocks-form/components';
import { RenderBlocks } from '@plone/volto/components';

const View = (props) => {
const { data } = props;
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const applyConfig = (config) => {
schema: schema,
restricted: false,
mostUsed: false,
blockHasOwnFocusManagement: true,
sidebarTab: 1,
blockHasOwnFocusManagement: false,
sidebarTab: 0,
security: {
addPermission: [],
view: [],
Expand Down

0 comments on commit d1dcc14

Please sign in to comment.