Jonas Björkert 1 anno fa
parent
commit
d7c970899e
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      LoopFollow/Snoozer/SnoozerView.swift

+ 5 - 2
LoopFollow/Snoozer/SnoozerView.swift

@@ -86,13 +86,16 @@ struct SnoozerView: View {
         VStack(spacing: 0) {
             Spacer()
 
-            // Clock and (optional) alert
             VStack(spacing: 8) {
-                Text("19:59" /* replace with time.value */)
+                TimelineView(.periodic(from: .now, by: 1)) { context in
+                    Text(context.date, format:
+                        Date.FormatStyle(date: .omitted, time: .shortened)
+                    )
                     .font(.system(size: 70))
                     .minimumScaleFactor(0.5)
                     .foregroundColor(.white)
                     .frame(height: 78)
+                }
 
                 /*
                 if let alarm = alarmText.value, !alarm.isEmpty {