diff --git a/src/core/client/stream/components/App.spec.tsx b/src/core/client/stream/components/App.spec.tsx index d7dfdc3a7..dcd979099 100644 --- a/src/core/client/stream/components/App.spec.tsx +++ b/src/core/client/stream/components/App.spec.tsx @@ -5,17 +5,9 @@ import { PropTypesOf } from "talk-framework/types"; import App from "./App"; -it("renders stream", () => { +it("renders comments", () => { const props: PropTypesOf = { - showPermalinkView: false, - }; - const wrapper = shallow(); - expect(wrapper).toMatchSnapshot(); -}); - -it("renders permalink view", () => { - const props: PropTypesOf = { - showPermalinkView: true, + activeTab: "COMMENTS", }; const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); diff --git a/src/core/client/stream/components/App.tsx b/src/core/client/stream/components/App.tsx index b7d2d09d9..421e6af9c 100644 --- a/src/core/client/stream/components/App.tsx +++ b/src/core/client/stream/components/App.tsx @@ -3,20 +3,22 @@ import { StatelessComponent } from "react"; import { Flex } from "talk-ui/components"; -import PermalinkViewQuery from "../queries/PermalinkViewQuery"; -import StreamQuery from "../queries/StreamQuery"; +import CommentsPaneContainer from "../tabs/comments/containers/CommentsPaneContainer"; import * as styles from "./App.css"; export interface AppProps { - showPermalinkView: boolean; + activeTab: "COMMENTS" | "%future added value"; } const App: StatelessComponent = props => { - const view = props.showPermalinkView ? ( - - ) : ( - - ); + let view: React.ReactElement; + switch (props.activeTab) { + case "COMMENTS": + view = ; + break; + default: + throw new Error(`Unknown tab ${props.activeTab}`); + } return ( {view} diff --git a/src/core/client/stream/components/Comment/HTMLContent.css b/src/core/client/stream/components/HTMLContent.css similarity index 100% rename from src/core/client/stream/components/Comment/HTMLContent.css rename to src/core/client/stream/components/HTMLContent.css diff --git a/src/core/client/stream/components/Comment/HTMLContent.spec.tsx b/src/core/client/stream/components/HTMLContent.spec.tsx similarity index 100% rename from src/core/client/stream/components/Comment/HTMLContent.spec.tsx rename to src/core/client/stream/components/HTMLContent.spec.tsx diff --git a/src/core/client/stream/components/Comment/HTMLContent.tsx b/src/core/client/stream/components/HTMLContent.tsx similarity index 100% rename from src/core/client/stream/components/Comment/HTMLContent.tsx rename to src/core/client/stream/components/HTMLContent.tsx diff --git a/src/core/client/stream/components/Comment/Timestamp.css b/src/core/client/stream/components/Timestamp.css similarity index 100% rename from src/core/client/stream/components/Comment/Timestamp.css rename to src/core/client/stream/components/Timestamp.css diff --git a/src/core/client/stream/components/Comment/Timestamp.spec.tsx b/src/core/client/stream/components/Timestamp.spec.tsx similarity index 100% rename from src/core/client/stream/components/Comment/Timestamp.spec.tsx rename to src/core/client/stream/components/Timestamp.spec.tsx diff --git a/src/core/client/stream/components/Comment/Timestamp.tsx b/src/core/client/stream/components/Timestamp.tsx similarity index 100% rename from src/core/client/stream/components/Comment/Timestamp.tsx rename to src/core/client/stream/components/Timestamp.tsx diff --git a/src/core/client/stream/components/UserBoxAuthenticated.tsx b/src/core/client/stream/components/UserBoxAuthenticated.tsx index 94ed90ac6..68c7fba00 100644 --- a/src/core/client/stream/components/UserBoxAuthenticated.tsx +++ b/src/core/client/stream/components/UserBoxAuthenticated.tsx @@ -20,7 +20,7 @@ const UserBoxAuthenticated: StatelessComponent< return ( } > @@ -28,7 +28,7 @@ const UserBoxAuthenticated: StatelessComponent< - + - + + ## Comments Tab comments-streamQuery-assetNotFound = Asset not found @@ -14,16 +26,6 @@ comments-permalinkPopover-copied = Copied comments-permalinkView-showAllComments = Show all comments comments-permalinkView-commentNotFound = Comment not found -comments-userBoxUnauthenticated-joinTheConversation = Join the conversation -comments-userBoxUnauthenticated-signIn = Sign in -comments-userBoxUnauthenticated-register = Register - -comments-userBoxAuthenticated-signedInAs = - Signed in as . - -comments-userBoxAuthenticated-notYou = - Not you? - comments-rte-bold = .title = Bold