mirror of
https://github.com/wassname/talk.git
synced 2026-08-19 12:40:16 +08:00
Working single comment view
This commit is contained in:
@@ -1,32 +1,28 @@
|
||||
import React, { StatelessComponent } from "react";
|
||||
import { graphql } from "react-relay";
|
||||
|
||||
import { withFragmentContainer } from "talk-framework/lib/relay";
|
||||
import { PropTypesOf } from "talk-framework/types";
|
||||
|
||||
import { PermalinkViewContainerQuery as Data } from "talk-stream/__generated__/PermalinkViewContainerQuery.graphql";
|
||||
import PermalinkView from "../components/PermalinkView";
|
||||
|
||||
import { PermalinkViewContainer as Data } from "talk-stream/__generated__/PermalinkViewContainer.graphql";
|
||||
|
||||
interface InnerProps {
|
||||
data: Data;
|
||||
}
|
||||
|
||||
export const PermalinkViewContainer: StatelessComponent<InnerProps> = props => {
|
||||
console.log("App query render", props);
|
||||
return <PermalinkView {...props.data} />;
|
||||
};
|
||||
|
||||
const enhanced = withFragmentContainer<{ data: Data }>({
|
||||
data: graphql`
|
||||
fragment PermalinkViewContainer on Query
|
||||
fragment PermalinkViewContainerQuery on Query
|
||||
@argumentDefinitions(commentID: { type: "ID!" }) {
|
||||
comment(id: $commentID) {
|
||||
id
|
||||
body
|
||||
author {
|
||||
username
|
||||
}
|
||||
body
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user