This commit is contained in:
Belén Curcio
2018-09-25 11:08:31 -03:00
parent 661f392281
commit 72bdf5d40b
6 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ import * as styles from "./App.css";
export interface AppProps {
activeTab: "COMMENTS" | "PROFILE" | "%future added value";
setActiveTab: SetActiveTabMutation;
onActiveTab: SetActiveTabMutation;
signedIn: boolean;
}
@@ -26,7 +26,7 @@ const App: StatelessComponent<AppProps> = props => {
<HorizontalGutter className={styles.root}>
<TabBar
activeTab={props.activeTab}
onTabClick={tab => props.setActiveTab({ tab })}
onTabClick={tab => props.onActiveTab({ tab })}
>
<Tab tabId="COMMENTS">Comments</Tab>
{props.signedIn && <Tab tabId="PROFILE">My Profile</Tab>}
@@ -12,7 +12,7 @@ import App from "../components/App";
interface InnerProps {
local: Local;
setActiveTab: SetActiveTabMutation;
onsetActiveTab: SetActiveTabMutation;
}
const AppContainer: StatelessComponent<InnerProps> = ({
@@ -22,7 +22,7 @@ const AppContainer: StatelessComponent<InnerProps> = ({
return (
<App
activeTab={activeTab}
setActiveTab={setActiveTab}
onActiveTab={setActiveTab}
signedIn={!!authToken}
/>
);
@@ -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" | string;
tab: "COMMENTS" | "PROFILE" | "%future added value";
}
export type SetActiveTabMutation = (input: SetActiveTabInput) => Promise<void>;
@@ -5,16 +5,16 @@ import { CommentsHistoryContainer_me as MeData } from "talk-stream/__generated__
import { HorizontalGutter, Typography } from "talk-ui/components";
import HistoryComment from "./HistoryComment";
export interface CommentHistoryProps {
export interface CommentsHistoryProps {
goToConversation: () => void;
me: MeData;
}
const CommentsHistory: StatelessComponent<CommentHistoryProps> = props => {
const CommentsHistory: StatelessComponent<CommentsHistoryProps> = props => {
const comments = props.me.comments.edges.map(edge => edge.node);
return (
<HorizontalGutter size="double">
<Localized id="commentHistory-commentHistory">
<Localized id="profile-commentHistory">
<Typography variant="heading3">Comment History</Typography>
</Localized>
{comments.map(comment => (
@@ -33,7 +33,7 @@ const HistoryComment: StatelessComponent<CommentHistoryProps> = props => {
<HorizontalGutter className={styles.sideBar}>
<Flex direction="row" alignItems="center" itemGutter="half">
<Icon className={styles.icon}>launch</Icon>
<Localized id="commentHistory-viewConversation">
<Localized id="profile-viewConversation">
<BaseButton
className={styles.button}
onClick={props.goToConversation}
@@ -57,7 +57,7 @@ const HistoryComment: StatelessComponent<CommentHistoryProps> = props => {
className={styles.text}
>
<Icon className={styles.icon}>reply</Icon>
<Localized id="commentHistory-replies">
<Localized id="profile-replies">
<span>Replies {props.comment.replyCount}</span>
</Localized>
</Flex>
+4 -4
View File
@@ -69,7 +69,7 @@ comments-editCommentForm-editRemainingTime = Edit: <time></time> remaining
comments-editCommentForm-editTimeExpired = Edit time has expired. You can no longer edit this comment. Why not post another one?
comments-editedMarker-edited = Edited
## Comment History
commentHistory-viewConversation = View Conversation
commentHistory-replies = Replies
commentHistory-commentHistory = Comment History
## Profile Tab
profile-viewConversation = View Conversation
profile-replies= Replies
profile-commentHistory= Comment History