Skip to content

Commit

Permalink
feat: show success banner on login success
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Jul 19, 2021
1 parent bf0dd41 commit 3eda558
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ struct SpotifyArtistSearchResponse: Codable {
struct SpotifyArtistSearchResultsResponse: Codable {
var items: [SpotifyArtist]
}

6 changes: 4 additions & 2 deletions firstfm/ViewModel/AuthViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class AuthViewModel: ObservableObject {
}

if let data = data {
print(data)
self.storedToken = data.session.key
DispatchQueue.main.async {
self.storedToken = data.session.key
FloatingNotificationBanner(title: "Successfully logged in", subtitle: "You can now browse your profile", style: .success).show()
}
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions firstfm/Views/Login/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ struct LoginView: View {
storedUsername = username
auth.login(username: username, password: password)
presentationMode.wrappedValue.dismiss()
print("login clicked")

}) {
LoginButton()
}
Expand Down
1 change: 0 additions & 1 deletion firstfm/Views/Profile/ProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ struct ProfileView_Previews: PreviewProvider {
ProfileView()
}
}

0 comments on commit 3eda558

Please sign in to comment.