Finish porting to relay-1.7 including types

This commit is contained in:
Chi Vinh Le
2018-08-30 23:49:38 +02:00
parent 0dcff65344
commit 942ce366b8
23 changed files with 94 additions and 52 deletions
@@ -16,7 +16,7 @@ const AppContainer: StatelessComponent<InnerProps> = ({
return <App showPermalinkView={!!commentID} />;
};
const enhanced = withLocalStateContainer<Local>(
const enhanced = withLocalStateContainer(
graphql`
fragment AppContainerLocal on Local {
commentID
@@ -28,7 +28,7 @@ export const CommentContainer: StatelessComponent<InnerProps> = props => {
return <Comment {...rest} {...props.data} />;
};
const enhanced = withFragmentContainer<{ data: Data }>({
const enhanced = withFragmentContainer<InnerProps>({
data: graphql`
fragment CommentContainer on Comment {
...CommentContainer_comment @relay(mask: false)
@@ -19,7 +19,7 @@ export const PermalinkContainer: StatelessComponent<InnerProps> = ({
) : null;
};
const enhanced = withLocalStateContainer<Local>(
const enhanced = withLocalStateContainer(
graphql`
fragment PermalinkButtonContainerLocal on Local {
assetURL
@@ -52,9 +52,7 @@ const enhanced = withContext(ctx => ({
pym: ctx.pym,
}))(
withSetCommentIDMutation(
withFragmentContainer<{
comment: CommentData | null;
}>({
withFragmentContainer<PermalinkViewContainerProps>({
comment: graphql`
fragment PermalinkViewContainer_comment on Comment {
...CommentContainer
@@ -67,7 +67,6 @@ interface FragmentVariables {
}
const enhanced = withPaginationContainer<
{ comment: Data },
InnerProps,
FragmentVariables,
ReplyListContainerPaginationQueryVariables
@@ -64,7 +64,6 @@ interface FragmentVariables {
}
const enhanced = withPaginationContainer<
{ asset: AssetData; user: UserData | null },
InnerProps,
FragmentVariables,
StreamContainerPaginationQueryVariables
@@ -78,7 +78,7 @@ export class UserBoxContainer extends Component<InnerProps> {
const enhanced = withSignOutMutation(
withSetAuthPopupStateMutation(
withShowAuthPopupMutation(
withLocalStateContainer<Local>(
withLocalStateContainer(
graphql`
fragment UserBoxContainerLocal on Local {
authPopup {
@@ -89,7 +89,7 @@ const enhanced = withSignOutMutation(
}
`
)(
withFragmentContainer<{ user: UserData | null }>({
withFragmentContainer<InnerProps>({
user: graphql`
fragment UserBoxContainer_user on User {
username