mirror of
https://github.com/wassname/talk.git
synced 2026-07-18 12:40:13 +08:00
Working signin and comment
This commit is contained in:
@@ -26,7 +26,10 @@ const Stream: StatelessComponent<StreamProps> = props => {
|
||||
return (
|
||||
<Flex className={styles.root} direction="column" itemGutter>
|
||||
<UserBoxContainer user={props.user} />
|
||||
<PostCommentFormContainer assetID={props.assetID} />
|
||||
<PostCommentFormContainer
|
||||
assetID={props.assetID}
|
||||
signedIn={!!props.user}
|
||||
/>
|
||||
<Flex
|
||||
direction="column"
|
||||
id="talk-comments-stream-log"
|
||||
|
||||
@@ -11,6 +11,7 @@ import { CreateCommentMutation, withCreateCommentMutation } from "../mutations";
|
||||
interface InnerProps {
|
||||
createComment: CreateCommentMutation;
|
||||
assetID: string;
|
||||
signedIn: boolean;
|
||||
}
|
||||
|
||||
class PostCommentFormContainer extends Component<InnerProps> {
|
||||
@@ -31,7 +32,12 @@ class PostCommentFormContainer extends Component<InnerProps> {
|
||||
return undefined;
|
||||
};
|
||||
public render() {
|
||||
return <PostCommentForm onSubmit={this.onSubmit} signedIn={false} />;
|
||||
return (
|
||||
<PostCommentForm
|
||||
onSubmit={this.onSubmit}
|
||||
signedIn={this.props.signedIn}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@ export const render = ({ error, props }: ReadyState<StreamQueryResponse>) => {
|
||||
if (error) {
|
||||
return <div>{error.message}</div>;
|
||||
}
|
||||
|
||||
if (props) {
|
||||
return <StreamContainer asset={props.asset} user={props.me} />;
|
||||
}
|
||||
|
||||
return <div>Loading</div>;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user