import "./AppMenu.js"
import "../apps/Forum/Forum.js"
import "../apps/Messages/Messages.js"
import "../apps/Jobs/Jobs.js"
    
class Home extends Shadow {

    render() {
        ZStack(() => {

            ZStack(() => {
                switch(window.location.pathname) {
                    case "/":
                        Forum()
                        break;
    
                    case "/messages":
                        Messages()
                        break;
    
                    case "/jobs":
                        Jobs()
                        break;
                }
            })
            .onNavigate(function () {
                console.log("navigate")
                this.rerender()
            })

            AppMenu()
        })
        .overflowX("hidden")
    }
}

register(Home)