Skip to content

Commit

Permalink
Merge pull request #477 from DeveloperAcademy-POSTECH/Gucci/fix/476_a…
Browse files Browse the repository at this point in the history
…djust_stadium_location

fix: [#476] adjust stadium location
  • Loading branch information
hyungminkimdev authored Nov 21, 2024
2 parents 383e6d1 + 65073e5 commit d6ea09d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
42 changes: 22 additions & 20 deletions SoccerBeat/SoccerBeat/Sources/Features/HomeView/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,31 +199,33 @@ struct MainView: View {
}
Spacer()
VStack(alignment: .trailing) {
VStack(alignment: .leading) {
Text(currentLocation)
.font(.mainDateLocation)
.foregroundStyle(.mainDateTime)
.opacity(0.8)
.task {
if !workouts.isEmpty {
currentLocation = await workouts[0].location
}
Text(currentLocation)
.font(.mainDateLocation)
.multilineTextAlignment(.trailing)
.foregroundStyle(.mainDateTime)
.opacity(0.8)
.task {
if !workouts.isEmpty {
currentLocation = await workouts[0].location
}
}

Group {
Text("경기 시간")
.lineLimit(1)
.minimumScaleFactor(0.5)
.padding(.top, 4)
Group {
Text("경기 시간")
.lineLimit(1)
.minimumScaleFactor(0.5)
Group {
if !workouts.isEmpty {
Text(workouts[0].time)
} else {
Text("--:--")
}
if !workouts.isEmpty {
Text(workouts[0].time)
} else {
Text("--:--")
}
}
.font(.mainTime)
.foregroundStyle(.mainMatchTime)
}
.font(.mainTime)
.foregroundStyle(.mainMatchTime)

Spacer()
if !workouts.isEmpty && !workouts[0].error {
HStack {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,19 @@ extension MatchListItemView {
@ViewBuilder
var timeAndLocation: some View {
Group {
Text(workoutData.yearMonthDay.description + " - " + currentLocation)
.task {
currentLocation = await workoutData.location
}
HStack(spacing: 0) {
Text(workoutData.yearMonthDay.description)
Text("경기 시간 ")
.padding(.leading)
Text(workoutData.time)
}


Text(currentLocation)
.frame(alignment: .trailing)
.multilineTextAlignment(.trailing)
.task {
currentLocation = await workoutData.location
}
}
.opacity(0.6)
.font(.matchDateLocationText)
Expand Down Expand Up @@ -328,8 +332,7 @@ extension MatchListItemView {

#Preview {
@StateObject var workoutManager = DIContianer.makeWorkoutManager()
return
MatchRecapView(workouts: .constant(WorkoutData.exampleWorkouts))
return MatchRecapView(workouts: .constant(WorkoutData.exampleWorkouts))
.environmentObject(ProfileModel(workoutManager: workoutManager))
.environmentObject(workoutManager)
}

0 comments on commit d6ea09d

Please sign in to comment.