Skip to content

Commit

Permalink
feat: use Sources from volto-embed
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Nov 21, 2023
1 parent e920388 commit 866e3bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@eeacms/volto-eea-map",
"@eeacms/volto-plotlycharts",
"@eeacms/volto-datablocks",
"@eeacms/volto-embed",
"@eeacms/volto-openlayers-map",
"@eeacms/volto-matomo",
"@eeacms/volto-eea-design-system",
Expand All @@ -29,6 +30,7 @@
],
"dependencies": {
"@eeacms/volto-datablocks": "*",
"@eeacms/volto-embed": "*",
"@eeacms/volto-eea-design-system": "*",
"@eeacms/volto-eea-map": "*",
"@eeacms/volto-eea-website-theme": "*",
Expand Down Expand Up @@ -110,4 +112,4 @@
"cypress:open": "make cypress-open",
"prepare": "husky install"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import { compose } from 'redux';
import { connectToMultipleProviders } from '@eeacms/volto-datablocks/hocs';
import { DataConnectedValue } from '@eeacms/volto-datablocks/Utils';
import { Sources } from '@eeacms/volto-datablocks/Utils';
import { Sources } from '@eeacms/volto-embed/Toolbar';

const providerView = (dataProviderKey, dataProvider, editMode) => {
return (
Expand Down Expand Up @@ -134,10 +134,9 @@ const View = (props) => {
dataProvider,
props.editMode,
)}
{Object.entries(
dataProvider.children,
).map(([cildrenKey, children]) =>
providerView(cildrenKey, children, props.editMode),
{Object.entries(dataProvider.children).map(
([cildrenKey, children]) =>
providerView(cildrenKey, children, props.editMode),
)}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { compose } from 'redux';
import { connectToMultipleProviders } from '@eeacms/volto-datablocks/hocs';
import { DataConnectedValue } from '@eeacms/volto-datablocks/Utils';
import { Sources } from '@eeacms/volto-datablocks/Utils';
import { Sources } from '@eeacms/volto-embed/Toolbar';

const ProviderView = ({ provider }) => {
if (!provider) return '';
Expand Down

0 comments on commit 866e3bf

Please sign in to comment.