Skip to content
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

Rename 'datas' to 'mealData' #114

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Projects/Feature/Source/Meal/MealView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ struct MealView: View {
var body: some View {
DodamScrollView.default(title: "급식") {
LazyVStack(spacing: 20) {
if let datas = viewModel.mealData {
if !datas.isEmpty {
if let mealData = viewModel.mealData {
if !mealData.isEmpty {
ForEach({ () -> [MealResponse] in
datas.filter {
mealData.filter {
let today = Calendar.current.startOfDay(for: Date())
return $0.exists && $0.date >= today
}
}(), id: \.self) { datas in
Text(datas.date.parseString(format: "M월 d일 EEEE"))
}(), id: \.self) { mealData in
Text(mealData.date.parseString(format: "M월 d일 EEEE"))
// .font(.body(.medium)) // TODO: Add color
// .dodamColor(
// isToday(datas.date)
// isToday(mealData.date)
// ? .onPrimary
// : .onSecondaryContainer
// )
.padding(.vertical, 4)
.frame(width: 218, height: 31)
// .background(
// isToday(datas.date)
// isToday(mealData.date)
// ? Dodam.color(.primary).opacity(0.65)
// : Dodam.color(.secondaryContainer)
// )
Expand All @@ -52,9 +52,9 @@ struct MealView: View {
ForEach(0..<3, id: \.self) { idx in
let data: Meal? = {
switch idx {
case 0: datas.breakfast
case 1: datas.lunch
case 2: datas.dinner
case 0: mealData.breakfast
case 1: mealData.lunch
case 2: mealData.dinner
default: nil
}
}()
Expand All @@ -75,7 +75,7 @@ struct MealView: View {
}
.frame(width: 52, height: 27)
// .background(
// isMealTime(datas.date, mealType: idx)
// isMealTime(mealData.date, mealType: idx)
// ? Dodam.color(.primary)
// : Dodam.color(.onSurfaceVariant)
// )
Expand Down
Loading