How to use the @plone/volto/helpers.getBaseUrl function in @plone/volto

To help you get started, we’ve selected a few @plone/volto examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plone / volto / src / components / manage / Tiles / Image / Edit.jsx View on Github external
readAsDataURL(file[0]).then(data => {
      const fields = data.match(/^data:(.*);(.*),(.*)$/);
      this.props.createContent(getBaseUrl(this.props.pathname), {
        '@type': 'Image',
        title: file[0].name,
        image: {
          data: fields[3],
          encoding: fields[2],
          'content-type': fields[1],
          filename: file[0].name,
        },
      });
    });
  };
github plone / volto / src / components / manage / Blocks / Listing / Edit.jsx View on Github external
<>
      {data?.query?.length === 0 && (
        
          {message =&gt; <p>{message}</p>}
        
      )}
      {data?.query?.length &gt; 0 &amp;&amp; (
        
          {message =&gt; <p>{message}</p>}
        
      )}
      
      
        
      
    
  );
};
github plone / volto / src / components / manage / Tiles / HeroImageLeft / Edit.jsx View on Github external
readAsDataURL(file).then(data => {
      const fields = data.match(/^data:(.*);(.*),(.*)$/);
      this.props.createContent(getBaseUrl(this.props.pathname), {
        '@type': 'Image',
        image: {
          data: fields[3],
          encoding: fields[2],
          'content-type': fields[1],
          filename: file.name,
        },
      });
    });
  }
github plone / volto / src / components / manage / Tiles / Slider / Edit.jsx View on Github external
readAsDataURL(file).then(data => {
      const fields = data.match(/^data:(.*);(.*),(.*)$/);
      this.props.createContent(getBaseUrl(this.props.pathname), {
        '@type': 'Image',
        image: {
          data: fields[3],
          encoding: fields[2],
          'content-type': fields[1],
          filename: file.name,
        },
      });
    });
  }