From bc4d746291b6b29dddb59c3c89f0c299306a5ea5 Mon Sep 17 00:00:00 2001 From: Kiwi Date: Fri, 19 Oct 2018 19:32:12 +0200 Subject: [PATCH] fix: use asset url (#2005) --- .../comments/containers/CommentContainer.tsx | 6 +- .../containers/PermalinkButtonContainer.tsx | 28 +- .../CommentContainer.spec.tsx.snap | 28 +- .../__snapshots__/editComment.spec.tsx.snap | 363 ++++++++ .../__snapshots__/loadMore.spec.tsx.snap | 165 ++++ .../__snapshots__/permalinkView.spec.tsx.snap | 264 ++++++ ...permalinkViewCommentNotFound.spec.tsx.snap | 33 + ...permalinkViewLoadMoreParents.spec.tsx.snap | 132 +++ .../__snapshots__/postComment.spec.tsx.snap | 264 ++++++ .../postLocalReply.spec.tsx.snap | 858 ++++++++++++++++++ .../__snapshots__/postReply.spec.tsx.snap | 330 +++++++ .../__snapshots__/renderReplies.spec.tsx.snap | 198 ++++ .../__snapshots__/renderStream.spec.tsx.snap | 66 ++ .../showAllReplies.spec.tsx.snap | 165 ++++ .../showConversation.spec.tsx.snap | 231 +++++ 15 files changed, 3112 insertions(+), 19 deletions(-) diff --git a/src/core/client/stream/tabs/comments/containers/CommentContainer.tsx b/src/core/client/stream/tabs/comments/containers/CommentContainer.tsx index 9516d10ac..daebede42 100644 --- a/src/core/client/stream/tabs/comments/containers/CommentContainer.tsx +++ b/src/core/client/stream/tabs/comments/containers/CommentContainer.tsx @@ -190,7 +190,10 @@ export class CommentContainer extends Component { active={showReplyDialog} /> )} - + = ({ - local, +export const PermalinkButtonContainerProps: StatelessComponent = ({ + asset, commentID, }) => { - return local.assetURL ? ( + return ( - ) : null; + ); }; -const enhanced = withLocalStateContainer( - graphql` - fragment PermalinkButtonContainerLocal on Local { - assetURL +const enhanced = withFragmentContainer({ + asset: graphql` + fragment PermalinkButtonContainer_asset on Asset { + url } - ` -)(PermalinkContainer); + `, +})(PermalinkButtonContainerProps); export default enhanced; diff --git a/src/core/client/stream/tabs/comments/containers/__snapshots__/CommentContainer.spec.tsx.snap b/src/core/client/stream/tabs/comments/containers/__snapshots__/CommentContainer.spec.tsx.snap index e1c085015..f637160c9 100644 --- a/src/core/client/stream/tabs/comments/containers/__snapshots__/CommentContainer.spec.tsx.snap +++ b/src/core/client/stream/tabs/comments/containers/__snapshots__/CommentContainer.spec.tsx.snap @@ -9,7 +9,12 @@ exports[`hide reply button 1`] = ` footer={ - - - - +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +