Make timeagoFormatter optional

This commit is contained in:
Chi Vinh Le
2018-07-13 19:58:58 -03:00
parent f693820244
commit 0aa556d288
6 changed files with 7 additions and 21 deletions
+6 -16
View File
@@ -9152,14 +9152,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -9174,20 +9172,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -9304,8 +9299,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@@ -9317,7 +9311,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -9332,7 +9325,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -9444,8 +9436,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -9578,7 +9569,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -13,7 +13,7 @@ export interface TalkContext {
localeMessages: MessageContext[];
// formatter for timeago.
timeagoFormatter: Formatter | null;
timeagoFormatter?: Formatter;
}
const { Provider, Consumer } = React.createContext<TalkContext>({} as any);
@@ -72,7 +72,6 @@ const environment = createEnvironment({
const context: TalkContext = {
relayEnvironment: environment,
timeagoFormatter: null,
localeMessages: [],
};
@@ -31,7 +31,6 @@ const environment = createEnvironment({
const context: TalkContext = {
relayEnvironment: environment,
timeagoFormatter: null,
localeMessages: [],
};
@@ -31,7 +31,6 @@ const environment = createEnvironment({
const context: TalkContext = {
relayEnvironment: environment,
timeagoFormatter: null,
localeMessages: [],
};
@@ -88,7 +88,6 @@ const environment = createEnvironment({
const context: TalkContext = {
relayEnvironment: environment,
timeagoFormatter: null,
localeMessages: [],
};