diff --git a/src/core/client/stream/components/App.tsx b/src/core/client/stream/components/App.tsx index d7d25be8f..4b9107bd6 100644 --- a/src/core/client/stream/components/App.tsx +++ b/src/core/client/stream/components/App.tsx @@ -16,9 +16,8 @@ import ProfileQuery from "../tabs/profile/queries/ProfileQuery"; import * as styles from "./App.css"; export interface AppProps { - activeTab: "COMMENTS" | "PROFILE" | "%future added value"; + activeTab: "COMMENTS" | "PROFILE" | "%future added value" | string; onActiveTab: SetActiveTabMutation; - signedIn: boolean; } const App: StatelessComponent = props => { @@ -29,7 +28,7 @@ const App: StatelessComponent = props => { onTabClick={tab => props.onActiveTab({ tab })} > Comments - {props.signedIn && My Profile} + My Profile diff --git a/src/core/client/stream/containers/AppContainer.tsx b/src/core/client/stream/containers/AppContainer.tsx index 65e74d219..e55048586 100644 --- a/src/core/client/stream/containers/AppContainer.tsx +++ b/src/core/client/stream/containers/AppContainer.tsx @@ -12,27 +12,20 @@ import App from "../components/App"; interface InnerProps { local: Local; - onsetActiveTab: SetActiveTabMutation; + setActiveTab: SetActiveTabMutation; } const AppContainer: StatelessComponent = ({ - local: { activeTab, authToken }, + local: { activeTab }, setActiveTab, }) => { - return ( - - ); + return ; }; const enhanced = withLocalStateContainer( graphql` fragment AppContainerLocal on Local { activeTab - authToken } ` )(withSetActiveTabMutation(AppContainer)); diff --git a/src/core/client/stream/mutations/SetActiveTabMutation.ts b/src/core/client/stream/mutations/SetActiveTabMutation.ts index e7e742042..a15eebc1a 100644 --- a/src/core/client/stream/mutations/SetActiveTabMutation.ts +++ b/src/core/client/stream/mutations/SetActiveTabMutation.ts @@ -3,7 +3,7 @@ import { commitLocalUpdate, Environment } from "relay-runtime"; import { createMutationContainer, LOCAL_ID } from "talk-framework/lib/relay"; export interface SetActiveTabInput { - tab: "COMMENTS" | "PROFILE" | "%future added value"; + tab: "COMMENTS" | "PROFILE" | "%future added value" | string; } export type SetActiveTabMutation = (input: SetActiveTabInput) => Promise; diff --git a/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx b/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx index dd6c8c0f4..9d750fe1b 100644 --- a/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx +++ b/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx @@ -5,13 +5,13 @@ import { HorizontalGutter, Typography } from "talk-ui/components"; import HistoryComment from "./HistoryComment"; interface Me { - comments: { - edges: Array<{ - node: { - id: string; - body: string | null; - createdAt: any; - replyCount: number | null; + readonly comments: { + readonly edges: ReadonlyArray<{ + readonly node: { + readonly id: string; + readonly body: string | null; + readonly createdAt: any; + readonly replyCount: number | null; }; }>; };