Integrate with embed

This commit is contained in:
Chi Vinh Le
2018-08-03 18:19:37 +02:00
parent 09cc76a973
commit b3fa5e1e73
14 changed files with 74 additions and 108 deletions
@@ -1,6 +1,5 @@
import React, { StatelessComponent } from "react";
import Logo from "talk-stream/components/Logo";
import { Button, Flex, Typography } from "talk-ui/components";
import CommentContainer from "../containers/CommentContainer";
@@ -17,44 +16,25 @@ const PermalinkView: StatelessComponent<PermalinkViewProps> = ({
comment,
onShowAllComments,
}) => {
if (comment) {
return (
<div className={styles.root}>
<Logo />
{assetURL && (
<Button
variant="outlined"
color="primary"
onClick={onShowAllComments}
fullWidth
>
Show all Comments
</Button>
)}
<Flex direction="column" className={styles.comment}>
<CommentContainer data={comment} />
</Flex>
</div>
);
}
return (
<div className={styles.root}>
<Logo />
<Typography className={styles.commentNotFound}>
Comment not found
</Typography>
{assetURL && (
<Button
variant="filled"
variant="outlined"
color="primary"
onClick={() => {
window.location.href = assetURL;
}}
onClick={onShowAllComments}
className={styles.button}
fullWidth
>
Show all Comments
</Button>
)}
{!comment && <Typography>Comment not found</Typography>}
{comment && (
<Flex direction="column">
<CommentContainer data={comment} />
</Flex>
)}
</div>
);
};