SwiftUI - Navigation View If Needed

I needed a way to add a toolbar in a view in SwiftUI without knowing if that view came from a navigation stack or not.