/*
	High level presentation component for entire front-end applicaiton
	index > app > nav & view
*/
import React from 'react'
import Main from './main/main'

// a "location" state variable and then selectively display a Component based on the value
var location = 'MAIN_PAGE'

// TODO :  routing logic to determine which view to display.
export const App = () => (
    <div>
        <div>Hello React!</div>
        <div>
            <Main />
        </div>

    </div>

    // if (location == 'MAIN_PAGE') {
    //     <Main />
    // } else if (location == 'PROFILE_PAGE') {
    //     <Profile />
    // } else {
    //     <Landing />
    // }
)


// TODO : Additionally we might have compound views, including a navigation section

export default App
@@ -154,24 +154,275 @@
 in'%0A
-%0A// a %22location%22
+import Profile from './profile/profile'%0Aimport Landing from './auth/landing'%0A%0A// TODO :  routing logic to determine which view to display.%0Aclass App extends React.Component %7B%0A%0A    constructor(props) %7B%0A        super(props)%0A        this.state = %7B%0A            // a route
  sta
@@ -453,16 +453,31 @@
 ectively
+%0A            //
  display
@@ -512,165 +512,546 @@
 lue%0A
-var location = 'MAIN_PAGE'%0A%0A// TODO :  routing logic to determine which view to display.%0Aexport const App = () =%3E (%0A    %3Cdiv%3E%0A        %3Cdiv%3EHello React!%3C/div%3E
+            route : window.location.hash.substr(1)%0A        %7D%0A    %7D%0A%0A    componentDidMount() %7B%0A        window.addEventListener('hashchange', () =%3E %7B%0A            this.setState(%7B%0A                route: window.location.hash.substr(1)%0A            %7D)%0A            console.log(this.state.route)%0A        %7D)%0A    %7D%0A%0A    render() %7B%0A        let Child%0A        switch (this.state.route) %7B%0A            case '/main': Child = Main; break;%0A            case '/profile': Child = Profile; break;%0A            default: Child = Landing;%0A        %7D%0A        return (
 %0A   
@@ -1055,16 +1055,20 @@
         
+    
 %3Cdiv%3E%0A  
@@ -1081,223 +1081,300 @@
     
-%3CMain /%3E%0A        %3C/div%3E%0A%0A    %3C/div%3E%0A%0A    // if (location == 'MAIN_PAGE') %7B%0A
+    %3Ch1%3EApp%3C/h1%3E%0A                %3Cul%3E%0A                    %3Cli%3E%3Ca href=%22#/%22%3ELanding%3C/a%3E%3C/li%3E%0A           
     
-//
      %3C
-Main /%3E%0A    // %7D else if (location == 'PROFILE_PAGE') %7B%0A
+li%3E%3Ca href=%22#/main%22%3EMain%3C/a%3E%3C/li%3E%0A           
     
-//
      %3C
-Profile /%3E%0A    // %7D else %7B%0A
+li%3E%3Ca href=%22#/profile%22%3EProfile%3C/a%3E%3C/li%3E%0A                %3C/ul%3E%0A                %3CChild/%3E%0A   
     
-//
      %3C
-Landing /%3E%0A    // %7D%0A)
+/div%3E%0A        )%0A    %7D%0A%7D%0A
 %0A%0A%0A/

Add routing logic for three views.