Mixonomer-iOS/Music Tools/Router.swift

32 lines
576 B
Swift
Raw Normal View History

//
// Router.swift
// Music Tools
//
// Created by Andy Pack on 25/04/2020.
// Copyright © 2020 Sarsoo. All rights reserved.
//
import SwiftUI
// Root level view loaded by delegate to show either main app or login screen
struct Router: View {
@EnvironmentObject var liveUser: LiveUser
@ViewBuilder
var body: some View {
if liveUser.loggedIn {
AppSkeleton()
}
else {
LoginScreen()
}
}
}
struct Router_Previews: PreviewProvider {
static var previews: some View {
Router()
}
}