mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
29 lines
615 B
TypeScript
29 lines
615 B
TypeScript
import * as React from "react";
|
|
import { StatelessComponent } from "react";
|
|
|
|
import { Flex } from "talk-ui/components";
|
|
|
|
import PermalinkViewQuery from "../queries/PermalinkViewQuery";
|
|
import StreamQuery from "../queries/StreamQuery";
|
|
|
|
import * as styles from "./App.css";
|
|
|
|
export interface AppProps {
|
|
showPermalinkView: boolean;
|
|
}
|
|
|
|
const App: StatelessComponent<AppProps> = props => {
|
|
const view = props.showPermalinkView ? (
|
|
<PermalinkViewQuery />
|
|
) : (
|
|
<StreamQuery />
|
|
);
|
|
return (
|
|
<Flex justifyContent="center" className={styles.root}>
|
|
{view}
|
|
</Flex>
|
|
);
|
|
};
|
|
|
|
export default App;
|