Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)}
{data.url && (
<>
{data.url.split('/').slice(-1)[0]}
{data.url.includes(settings.apiPath) && (
<img alt="{alt}" src="{`${flattenToAppURL(data.url)}/@@images/image/mini`}">
)}
{!data.url.includes(settings.apiPath) && (
<img style="{{" alt="{alt}" src="{data.url}">
)}
{data.url.includes(settings.apiPath) && (
openObjectBrowser()}
{listingItems.map(item => (
<div>
{!item[settings.listingPreviewImageField] && (
<img alt="" src="{DefaultImageSVG}">
)}
{item[settings.listingPreviewImageField] && (
<img alt="{item.title}" src="{flattenToAppURL(">
)}
<div>
<h3>{item.title ? item.title : item.id}</h3></div></div>
}
>
)}
{item.url ? (
<img alt="" src="{">
) : (
<div>
{this.state.uploading &&
this.state.currentSelectedCard ===
index && (
Uploading image
</div>
const View = ({ data }) => (
<div>
<div>
{data.url && (
<img alt="" src="{`${flattenToAppURL(data.url)}/@@images/image`}">
)}
<div>
{data.title && <h1>{data.title}</h1>}
{data.description && <p>{data.description}</p>}
</div>
</div>
</div>
);
{this.props.appendSecondaryActions && (
<>{this.props.appendSecondaryActions}
)}
)}
{this.props.selected &&
!this.props.data.url &&
this.props.appendSecondaryActions && (
<div>{this.props.appendSecondaryActions}</div>
)}
{this.props.data.url ? (
<p>
<img alt="" src="{">
</p>
) : (
<div>
{this.state.uploading && (
Uploading image
)}
<center>
<img alt="" src="{imageTileSVG}"></center></div>
{(() => {
const image = (
<img alt="{data.alt" src="{">
);
if (data.external) {
const isReallyExternal =
(data.external.startsWith('http') ||
data.external.startsWith('https')) &&
!data.external.includes(settings.apiPath);
if (isReallyExternal) {
return (
{listingItems.map(item => (
<div>
{!item[settings.listingPreviewImageField] && (
<img alt="" src="{DefaultImageSVG}">
)}
{item[settings.listingPreviewImageField] && (
<img alt="{item.title}" src="{flattenToAppURL(">
)}
<div>
<h3>{item.title ? item.title : item.id}</h3>
<p>{item.description}</p>
</div>
</div>
))}
this.props.onChangeTile(this.props.tile, {
...this.props.data,
url: '',
})
}
>
)}
<div>
{this.props.data.url ? (
<img alt="" src="{`${flattenToAppURL(this.props.data.url)}/@@images/image`}">
) : (
<div>
{this.state.uploading && (
Uploading image
)}
<center>
<h4>Image</h4>
<p>Upload a new image</p>
<p>
<label>
Browse</label></p></center></div></div>