-
Notifications
You must be signed in to change notification settings - Fork 14
Ananya/user location guide #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // | ||
| // DistanceLabelView.swift | ||
| // berkeley-mobile | ||
| // | ||
| // Created by Ananya Dua on 11/24/25. | ||
| // Copyright © 2025 ASUC OCTO. All rights reserved. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| struct DistanceLabelView: View { | ||
| let distance: Double? | ||
|
|
||
| var body: some View { | ||
| HStack { | ||
| Image(systemName: "figure.walk") | ||
| .foregroundStyle(Color(BMColor.blackText)) | ||
| .font(.system(size: 12)) | ||
|
|
||
| Text("\(distance ?? 0.0, specifier: "%.1f") mi") | ||
| .foregroundStyle(Color(BMColor.blackText)) | ||
| .font(Font(BMFont.light(12))) | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,15 +44,7 @@ struct HomeSectionListRowView: View { | |
| } | ||
|
|
||
| private var distanceLabelView: some View { | ||
| HStack { | ||
| Image(systemName: "figure.walk") | ||
| .foregroundStyle(Color(BMColor.blackText)) | ||
| .font(.system(size: 12)) | ||
|
|
||
| Text("\(rowItem.distanceToUser ?? 0.0, specifier: "%.1f") mi") | ||
| .foregroundStyle(Color(BMColor.blackText)) | ||
| .font(Font(BMFont.light(12))) | ||
| } | ||
| DistanceLabelView(distance: rowItem.distanceToUser) | ||
|
||
| } | ||
|
|
||
| private var imageView: some View { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the user distance to location view that we already use in the home drawer:
It's located as
distanceLabelViewinHomeSectionListRowView.swift. You should refactor this into its own reusable view.