mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
Use pagination container
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
import {
|
||||
ConnectionConfig,
|
||||
ConnectionConfig as OrigConnectionConfig,
|
||||
createPaginationContainer,
|
||||
GraphQLTaggedNode,
|
||||
PageInfo,
|
||||
RelayPaginationProp,
|
||||
} from "react-relay";
|
||||
import { InferableComponentEnhancerWithProps } from "recompose";
|
||||
import { Overwrite } from "talk-framework/types";
|
||||
|
||||
// TODO: (cvle) Fix this type definition upstream.
|
||||
interface ConnectionData {
|
||||
edges?: Readonly<any>;
|
||||
pageInfo?: PageInfo;
|
||||
}
|
||||
|
||||
type ConnectionConfig<T> = Overwrite<
|
||||
OrigConnectionConfig<T>,
|
||||
{ getConnectionFromProps?(props: T): ConnectionData | undefined | null }
|
||||
>;
|
||||
|
||||
/**
|
||||
* withPaginationContainer is a curried version of `createPaginationContainers`
|
||||
|
||||
Reference in New Issue
Block a user