Fix
This commit is contained in:
@@ -17,7 +17,12 @@ struct ProfileView: View {
|
||||
var body: some View {
|
||||
ScrollView(showsIndicators: false) {
|
||||
VStack(spacing: 18) {
|
||||
header
|
||||
NavigationLink {
|
||||
UserProfileView(appState: $appState)
|
||||
} label: {
|
||||
header
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
VStack(spacing: 14) {
|
||||
NavigationLink {
|
||||
@@ -42,7 +47,7 @@ struct ProfileView: View {
|
||||
// .buttonStyle(.plain)
|
||||
|
||||
NavigationLink {
|
||||
Text("Minhas Avaliações")
|
||||
MyReviewsView()
|
||||
} label: {
|
||||
ProfileMenuRow(icon: "star.fill", title: "Minhas Avaliações")
|
||||
}
|
||||
@@ -122,9 +127,17 @@ struct ProfileView: View {
|
||||
.fill(Color.white.opacity(0.18))
|
||||
.frame(width: 96, height: 96)
|
||||
.overlay(
|
||||
Text(profileInitials)
|
||||
.font(.system(size: 30, weight: .bold))
|
||||
.foregroundStyle(AppColors.textInverse)
|
||||
Group {
|
||||
if let picture = profilePictureURL {
|
||||
AsyncStoreImage(imageURL: picture)
|
||||
.frame(width: 92, height: 92)
|
||||
.clipShape(Circle())
|
||||
} else {
|
||||
Text(profileInitials)
|
||||
.font(.system(size: 30, weight: .bold))
|
||||
.foregroundStyle(AppColors.textInverse)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Circle()
|
||||
@@ -189,6 +202,12 @@ struct ProfileView: View {
|
||||
return joined.isEmpty ? "AS" : joined.uppercased()
|
||||
}
|
||||
|
||||
private var profilePictureURL: String? {
|
||||
let raw = appState.profile.profilePicture.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
guard raw.isEmpty == false else { return nil }
|
||||
return ImageSourceResolver.resolve(raw)
|
||||
}
|
||||
|
||||
private func logout() {
|
||||
tokenStore.clear()
|
||||
SessionStateStore.clearActiveUser()
|
||||
|
||||
Reference in New Issue
Block a user