mirror of
https://github.com/wassname/talk.git
synced 2026-07-17 11:33:39 +08:00
* feat: extract jwt information * feat: login status dependent auto redirect * feat: Sign Out button * feat: add a 404 page * feat: improve loading state and use auth token info * feat: redirect to previous destination * feat: implement new design * fix: change asset to story * feat: add translations * feat: more compact design * test: add unit tests * chore: refactor NavigationLink * test: add integration tests * chore: refactor replaceHistoryLocation * fix: typo * fix: property name typo
33 lines
974 B
TypeScript
33 lines
974 B
TypeScript
import * as React from "react";
|
|
import { StatelessComponent } from "react";
|
|
import TabBarQuery from "talk-stream/queries/TabBarQuery";
|
|
import { HorizontalGutter, TabContent, TabPane } from "talk-ui/components";
|
|
|
|
import CommentsPaneContainer from "../tabs/comments/containers/CommentsPaneContainer";
|
|
import ProfileQuery from "../tabs/profile/queries/ProfileQuery";
|
|
import * as styles from "./App.css";
|
|
|
|
type TabValue = "COMMENTS" | "PROFILE" | "%future added value";
|
|
|
|
export interface AppProps {
|
|
activeTab: TabValue;
|
|
}
|
|
|
|
const App: StatelessComponent<AppProps> = props => {
|
|
return (
|
|
<HorizontalGutter className={styles.root}>
|
|
<TabBarQuery />
|
|
<TabContent activeTab={props.activeTab} className={styles.tabContent}>
|
|
<TabPane tabId="COMMENTS">
|
|
<CommentsPaneContainer />
|
|
</TabPane>
|
|
<TabPane tabId="PROFILE">
|
|
<ProfileQuery />
|
|
</TabPane>
|
|
</TabContent>
|
|
</HorizontalGutter>
|
|
);
|
|
};
|
|
|
|
export default App;
|