Adding found

This commit is contained in:
Belén Curcio
2018-09-27 10:37:09 -03:00
parent 2f361d4437
commit 929fa8ca31
6 changed files with 13 additions and 60 deletions
+2 -28
View File
@@ -2,36 +2,10 @@ import React, { StatelessComponent } from "react";
import { HorizontalGutter } from "talk-ui/components";
import NavigationContainer from "../containers/NavigationContainer";
export type View =
| "MODERATE"
| "COMMUNITY"
| "STORIES"
| "CONFIGURE"
| "%future added value";
export interface AppProps {
view: View;
}
const renderView = (view: View) => {
switch (view) {
case "MODERATE":
return <div>MODERATE</div>;
case "COMMUNITY":
return <div>COMMUNITY</div>;
case "STORIES":
return <div>STORIES</div>;
case "CONFIGURE":
return <div>CONFIGURE</div>;
default:
throw new Error(`Unknown view ${view}`);
}
};
const App: StatelessComponent<AppProps> = ({ view }) => (
const App: StatelessComponent = ({ children }) => (
<HorizontalGutter>
<NavigationContainer />
{renderView(view)}
{children}
</HorizontalGutter>
);