Skip to content

Commit

Permalink
feat: implement router
Browse files Browse the repository at this point in the history
  • Loading branch information
carissafarry committed Dec 27, 2023
1 parent 7722468 commit ebddbbc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion StudyFora/StudyForaApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ import SwiftUI
@main
struct StudyForaApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
@ObservedObject var router = Router()

var body: some Scene {
WindowGroup {
ContentView()
NavigationStack(path: $router.navPath) {
ContentView()
.navigationDestination(for: Router.Destination.self) { destination in
Routes(route: destination)
}
}
.environmentObject(router)

}
}
}

0 comments on commit ebddbbc

Please sign in to comment.