-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from revanthkumarJ/main
fix: today menu bug
- Loading branch information
Showing
3 changed files
with
18 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
export const formatMessData = (res) => { | ||
let formattedData = []; | ||
const data = res.data.data; | ||
for (let day in data) { | ||
let meals = data[day]; | ||
let formattedMeals = {}; | ||
for (let meal in meals) { | ||
const val = meals[meal].reduce( | ||
(acc, val) => acc + " , " + val.itemName, | ||
"" | ||
); | ||
formattedMeals[meal] = val.substring(2); | ||
let FormattedData = {}; | ||
const data = res.data.data; | ||
for (let day in data) { | ||
let meals = data[day]; | ||
let formattedMeals = {}; | ||
for (let meal in meals) { | ||
const val = meals[meal].reduce( | ||
(acc, val) => acc + ", " + val.itemName, | ||
"" | ||
); | ||
formattedMeals[meal] = val.substring(2); | ||
} | ||
FormattedData[day] = formattedMeals; | ||
} | ||
|
||
formattedData[day] = formattedMeals; | ||
} | ||
|
||
return formattedData; | ||
}; | ||
return FormattedData; | ||
}; |
This file was deleted.
Oops, something went wrong.