Skip to content
Snippets Groups Projects
Commit 3b759a53 authored by chris's avatar chris
Browse files

fix transition

parent 7b6dbbe2
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,8 @@ import CommentBox from './ui/comments/CommentBox';
const ConnectedCommentStyled = styled.div`
margin-left: ${props => (props.active ? `${-20}px` : `${50}px`)};
// transition: ${props => (props.active ? `all 1s` : `all 0.5s`)};
transition: ${props =>
props.active && props.length ? `none!important` : `all 1.3s`};
position: absolute;
width: 200px;
@media (max-width: 600px) {
......@@ -163,12 +164,13 @@ export default ({ comment, top, commentId, recalculateTops }) => {
}
}, 400);
};
console.log(isActive && comment.attrs.conversation.length === 0);
const MemorizedComponent = useMemo(
() => (
<ConnectedCommentStyled
active={isActive}
data-box={commentId}
length={comment.attrs.conversation.length === 0}
style={styles}
>
<CommentBox
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment