renaming stuff!
This commit is contained in:
parent
ee3b924afc
commit
ca910e57ff
18
OnCue/View/CardsView.swift
Normal file
18
OnCue/View/CardsView.swift
Normal 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()
|
||||||
|
}
|
@ -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)
|
||||||
}
|
}
|
@ -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()
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user