// // VisitingChefs.swift // RIT Dining // // Created by Campbell on 9/8/25. // import SwiftUI struct IdentifiableURL: Identifiable { let id = UUID() let url: URL } struct VisitingChefs: View { @State private var diningLocations: [DiningLocation] = [] @State private var isLoading: Bool = true @State private var rotationDegrees: Double = 0 @State private var daySwitcherRotation: Double = 0 @State private var safariUrl: IdentifiableURL? @State private var isTomorrow: Bool = false private var animation: Animation { .linear .speed(0.1) .repeatForever(autoreverses: false) } private let display: DateFormatter = { let display = DateFormatter() display.timeZone = TimeZone(identifier: "America/New_York") display.dateStyle = .none display.timeStyle = .short return display }() // Asynchronously fetch the data for all of the locations on the given date (only ever today or tomorrow) to get the visiting chef // information. private func getDiningDataForDate(date: String) { var newDiningLocations: [DiningLocation] = [] getAllDiningInfo(date: date) { result in DispatchQueue.global().async { switch result { case .success(let locations): for i in 0..