fix: carousel sidebar

This commit is contained in:
Akuoko Daniel Jnr 2021-04-02 15:17:51 +00:00
parent b860987762
commit 597bd2e603
No known key found for this signature in database
GPG Key ID: 1C95803CACD3E9DC

View File

@ -469,7 +469,7 @@ class CarouselSidebarData extends React.Component {
</div>
);
}
console.log(Validations.isPreviewableImage(type));
elements.push(
<div key="s-2" style={{ marginBottom: 80 }}>
<div css={STYLES_META}>
@ -563,25 +563,35 @@ class CarouselSidebarData extends React.Component {
)}
{type && Validations.isPreviewableImage(type) ? null : (
<div>
{coverImage && (
<React.Fragment>
<System.P css={STYLES_SECTION_HEADER} style={{ margin: "48px 0px 8px 0px" }}>
Preview image
</System.P>
{coverImage ? (
<React.Fragment>
<System.P css={STYLES_TEXT}>This is the preview image of your file.</System.P>
<div css={STYLES_IMAGE_BOX} style={{ marginTop: 24 }}>
<img
src={coverImage.url}
src={coverImage?.url}
alt=""
style={{ maxWidth: "368px", maxHeight: "368px" }}
/>
</div>
</React.Fragment>
) : (
<System.P css={STYLES_TEXT}>Add a cover image for your file.</System.P>
</React.Fragment>
)}
{this.props.isOwner && (
<React.Fragment>
<System.P css={STYLES_TEXT}>Add a cover image for your file.</System.P>
<div style={{ marginTop: 16 }}>
<input css={STYLES_FILE_HIDDEN} type="file" id="file" onChange={this._handleUpload} />
<input
css={STYLES_FILE_HIDDEN}
type="file"
id="file"
onChange={this._handleUpload}
/>
<System.ButtonPrimary
full
type="label"
@ -591,6 +601,8 @@ class CarouselSidebarData extends React.Component {
Upload image
</System.ButtonPrimary>
</div>
</React.Fragment>
)}
</div>
)}
{this.props.isOwner ? (