diff --git a/src/core/client/stream/components/Permalink/PermalinkView.css b/src/core/client/stream/components/Permalink/PermalinkView.css index c2147d4ce..03b9e55dd 100644 --- a/src/core/client/stream/components/Permalink/PermalinkView.css +++ b/src/core/client/stream/components/Permalink/PermalinkView.css @@ -4,6 +4,7 @@ margin: 20px auto; } -.comment { +.comment, +.commentNotFound { margin: 20px auto; } diff --git a/src/core/client/stream/components/Permalink/PermalinkView.tsx b/src/core/client/stream/components/Permalink/PermalinkView.tsx index ad10de179..1d21a5032 100644 --- a/src/core/client/stream/components/Permalink/PermalinkView.tsx +++ b/src/core/client/stream/components/Permalink/PermalinkView.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import { StatelessComponent } from "react"; import Logo from "talk-stream/components/Logo"; -import { Button, Flex } from "talk-ui/components"; +import { Button, Flex, Typography } from "talk-ui/components"; import CommentContainer from "../../containers/CommentContainer"; import * as styles from "./PermalinkView.css"; @@ -12,20 +12,22 @@ export interface InnerProps { } const PermalinkView: StatelessComponent = props => { + let assetURL: string = ""; const query = qs.parse(location.search); if (!query.assetID && !query.commentID) { return
Bad url: `assetID` and `commentID` params are needed
; } - if (props.comment) { + if (query.assetID) { // TODO (bc) temporary needed to pass the assetID to go back to the correct asset until the backend // returns the correct asset url - let assetURL: string = ""; if (query.assetID) { assetURL = `${location.origin}/?assetID=${query.assetID}`; } + } + if (props.comment) { return (
@@ -47,7 +49,25 @@ const PermalinkView: StatelessComponent = props => { ); } - return
Comment not found
; + return ( +
+ + + Comment not found + + {assetURL && ( + + )} +
+ ); }; export default PermalinkView;