I was trying to construct a SwiftUI Preview of a view using:
WeekTasks(weeksData: demoWeeksData)
`demoWeeksData` was defined as a global variable:
var demoWeeksData: [WeekData] = [
WeekData(title: "Walk / Steps", emoji: "🚶♂️", week: [0, 1, 1, 0, 0, 1, 1]),
]
But the Swift compiler said No.
It turns