mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
Working single comment view
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
import * as React from "react";
|
||||
import { StatelessComponent } from "react";
|
||||
|
||||
import { CommentProps } from "talk-stream/components/Comment";
|
||||
import { Flex } from "talk-ui/components";
|
||||
import CommentContainer from "../containers/CommentContainer";
|
||||
|
||||
export interface AppProps {
|
||||
comment: CommentProps | null;
|
||||
export interface InnerProps {
|
||||
comment: {} | null;
|
||||
}
|
||||
|
||||
const PermalinkView: StatelessComponent<AppProps> = props => {
|
||||
const PermalinkView: StatelessComponent<InnerProps> = props => {
|
||||
if (props.comment) {
|
||||
return (
|
||||
<Flex justifyContent="center">
|
||||
<Flex direction="column" itemGutter>
|
||||
<Flex direction="column">
|
||||
<CommentContainer data={props.comment} />
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
||||
return <div> Error </div>;
|
||||
return <div>Comment not found</div>;
|
||||
};
|
||||
|
||||
export default PermalinkView;
|
||||
|
||||
Reference in New Issue
Block a user