renaming stuff!

This commit is contained in:
breadone 2024-06-22 14:24:39 +12:00
parent ee3b924afc
commit ca910e57ff
No known key found for this signature in database
3 changed files with 23 additions and 15 deletions

View File

@ -0,0 +1,18 @@
//
// CardsView.swift
// OnCue
//
// Created by Pradyun Setti on 22/06/2024.
//
import SwiftUI
struct CardsView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
#Preview {
CardsView()
}

View File

@ -1,5 +1,5 @@
// //
// ContentView.swift // MainView.swift
// OnCue // OnCue
// //
// Created by Pradyun Setti on 22/06/2024. // Created by Pradyun Setti on 22/06/2024.
@ -8,7 +8,7 @@
import SwiftUI import SwiftUI
import SwiftData import SwiftData
struct ContentView: View { struct MainView: View {
@Environment(\.modelContext) private var modelContext @Environment(\.modelContext) private var modelContext
@Query private var items: [OCProject] @Query private var items: [OCProject]
@ -25,8 +25,6 @@ struct ContentView: View {
.font(.title2) .font(.title2)
.foregroundStyle(.blue) .foregroundStyle(.blue)
Text("\(item.cards.count) Cards") Text("\(item.cards.count) Cards")
// Text("Last Edited: \(item.lastEditedDate.formatted())")
// .font(.subheadline)
} }
} }
.padding(.horizontal, 8) .padding(.horizontal, 8)
@ -68,20 +66,12 @@ struct ContentView: View {
} }
#Preview { #Preview {
// let config = ModelConfiguration(isStoredInMemoryOnly: true)
// let container = try! ModelContainer(for: User.self, configurations: config)
//
// let user = User(name: "Test User")
// return EditingView(user: user)
// .modelContainer(container)
let config = ModelConfiguration(isStoredInMemoryOnly: true) let config = ModelConfiguration(isStoredInMemoryOnly: true)
let container = try! ModelContainer(for: OCProject.self, configurations: config) let container = try! ModelContainer(for: OCProject.self, configurations: config)
let p = OCProject(name: "test project") let p = OCProject(name: "test project")
container.mainContext.insert(p) container.mainContext.insert(p)
return ContentView() return MainView()
.modelContainer(container) .modelContainer(container)
} }

View File

@ -7,7 +7,7 @@
import SwiftUI import SwiftUI
struct ContentView: View { struct MainViewPresenter: View {
var body: some View { var body: some View {
VStack { VStack {
Image(systemName: "globe") Image(systemName: "globe")
@ -20,5 +20,5 @@ struct ContentView: View {
} }
#Preview { #Preview {
ContentView() MainViewPresenter()
} }