|
@@ -39,9 +39,11 @@ class PostImage extends React.Component {
|
|
handlePrev = () => this.carouselRef.current.prev(this);
|
|
handlePrev = () => this.carouselRef.current.prev(this);
|
|
|
|
|
|
moveOnDivArray = (length, index) => {
|
|
moveOnDivArray = (length, index) => {
|
|
- if (index === 0) {
|
|
|
|
|
|
+ if (length === 1) {
|
|
|
|
+ this.setState({ movePrev: false, moveNext: false })
|
|
|
|
+ } else if (index === 0) {
|
|
this.setState({ movePrev: false, moveNext: true })
|
|
this.setState({ movePrev: false, moveNext: true })
|
|
- } else if (index === length - 1) {
|
|
|
|
|
|
+ } else if (index === length - 1 && length > 1) {
|
|
this.setState({ movePrev: true, moveNext: false })
|
|
this.setState({ movePrev: true, moveNext: false })
|
|
} else {
|
|
} else {
|
|
this.setState({ movePrev: true, moveNext: true })
|
|
this.setState({ movePrev: true, moveNext: true })
|
|
@@ -85,8 +87,6 @@ const Post = ({ postData: { text, title, owner, images, createdAt, comments } })
|
|
<div className='Post'>
|
|
<div className='Post'>
|
|
<Card
|
|
<Card
|
|
title={<PostTitle owner={owner} />}
|
|
title={<PostTitle owner={owner} />}
|
|
- // hoverable
|
|
|
|
-
|
|
|
|
cover={<PostImage images={images} />}
|
|
cover={<PostImage images={images} />}
|
|
>
|
|
>
|
|
<Meta title="Europe Street beat" description="www.instagram.com" />
|
|
<Meta title="Europe Street beat" description="www.instagram.com" />
|