From f776431b7fdcec492f87d41bb342a2dce9220d2e Mon Sep 17 00:00:00 2001 From: Sebastien Stormacq Date: Sat, 22 Jun 2024 21:32:00 +0200 Subject: [PATCH] prepare for CI demo --- code/getting started/ContentView.swift | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/code/getting started/ContentView.swift b/code/getting started/ContentView.swift index 90bcc0d..fa9cf9f 100644 --- a/code/getting started/ContentView.swift +++ b/code/getting started/ContentView.swift @@ -115,12 +115,11 @@ struct ListRow: View { if let description = note.description { Text(description) .foregroundColor(.gray) -// .foregroundColor(.white) } } } .padding([.top, .bottom], 20) -// .background(.gray) + .background(.gray) } } @@ -180,16 +179,18 @@ struct AddNoteView: View { } } } - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - let user1 = ViewModel.mock - return Group { - ContentView().environmentObject(user1) - ContentView().navigationView(notes: user1.notes, signOut: {}) - AddNoteView(isPresented: .constant(true), model: user1) - } - } +#Preview("Unauthenticated") { + let user1 = ViewModel.mock + return ContentView().environmentObject(user1) } +#Preview("Authenticated") { + let user1 = ViewModel.mock + return ContentView().navigationView(notes: user1.notes, signOut: {}) +} + +#Preview("Add memory") { + let user1 = ViewModel.mock + return AddNoteView(isPresented: .constant(true), model: user1) +}