8000 ♻️ Refactor: Update CharacterProfileView layout and navigation · mohanedy/swifty-marvel@c532d5b · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
♻️ Refactor: Update CharacterProfileView layout and navigation
Browse files Browse the repository at this point in the history
- Updated the layout of CharacterProfileView to use a NavigationStack
  • Loading branch information
Mohaned Yossry committed Aug 15, 2023
1 parent 215d922 commit c532d5b
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@ struct CharacterProfileView: View {
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>

var body: some View {
ScrollView {
ZStack(alignment: .topLeading) {
coverImageView
contentView
}//: ZStack
}//: ScrollView
.scrollIndicators(.hidden)
.navigationBarBackButtonHidden(true)
.toolbarBackground(.hidden, for: .navigationBar)
.ignoresSafeArea()
.onAppear {
Task {
await viewModel.loadComics(forCharacter: character.id ?? 0)
NavigationStack {
ScrollView {
ZStack(alignment: .topLeading) {
coverImageView
contentView
}//: ZStack
}//: ScrollView
.scrollIndicators(.hidden)
.navigationBarBackButtonHidden(true)
.toolbarBackground(.hidden, for: .navigationBar)
.ignoresSafeArea()
.onAppear {
Task {
await viewModel.loadComics(forCharacter: character.id ?? 0)
}
}
}
}
Expand Down

0 comments on commit c532d5b

Please sign in to comment.
0