How to use the contentful-ui-extensions-sdk.locations.LOCATION_APP function in contentful-ui-extensions-sdk

To help you get started, we’ve selected a few contentful-ui-extensions-sdk 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 contentful / extensions / marketplace / image-focal-point / src / index.js View on Github external
init(sdk => {
  if (sdk.location.is(locations.LOCATION_DIALOG)) {
    renderDialog(sdk);
  } else if (sdk.location.is(locations.LOCATION_APP)) {
    ReactDOM.render(, document.getElementById('root'));
  } else {
    ReactDOM.render(, document.getElementById('root'));
  }
});
github contentful / extensions / marketplace / gatsby-preview / src / index.js View on Github external
init(sdk => {
  const root = document.getElementById('root');

  if (sdk.location.is(locations.LOCATION_ENTRY_SIDEBAR)) {
    render(, root);
  } else if (sdk.location.is(locations.LOCATION_APP)) {
    render(, root);
  }
});
github contentful / extensions / marketplace / optimizely / src / index.js View on Github external
render() {
    const { state, props } = this;
    const { sdk } = props;
    const { client } = state;
    const { location, parameters } = sdk;

    if (location.is(locations.LOCATION_APP)) {
      return (
        
      );
    }

    if (location.is(locations.LOCATION_ENTRY_SIDEBAR)) {
      if (!parameters.installation.optimizelyProjectId) {
        return ;
      }

      return ;
github contentful / extensions / lib / shared-dam-app / src / index.tsx View on Github external
if (sdk.location.is(locations.LOCATION_ENTRY_FIELD)) {
      render(
        ,
        root
      );
    }

    if (sdk.location.is(locations.LOCATION_APP)) {
      render(
        ,
        root
      );
    }
  });
}