Skip to content

Commit

Permalink
Updated noted app
Browse files Browse the repository at this point in the history
  • Loading branch information
owdax committed Jan 7, 2025
1 parent 9ad66f3 commit 6ca914b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 84 deletions.
66 changes: 0 additions & 66 deletions Noted/ContentView.swift

This file was deleted.

36 changes: 18 additions & 18 deletions Noted/NotedApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
// Created by Omid DolatKia on 2024/10/31.
//

import SwiftUI
import SwiftData
import SwiftUI

@main
struct NotedApp: App {
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Item.self,
])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Note.self
])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)

do {
return try ModelContainer(for: schema, configurations: [modelConfiguration])
} catch {
fatalError("Could not create ModelContainer: \(error)")
}
}()
do {
return try ModelContainer(for: schema, configurations: [modelConfiguration])
} catch {
fatalError("Could not create ModelContainer: \(error)")
}
}()

var body: some Scene {
WindowGroup {
ContentView()
}
.modelContainer(sharedModelContainer)
}
var body: some Scene {
WindowGroup {
HomeView()
}
.modelContainer(sharedModelContainer)
}
}

0 comments on commit 6ca914b

Please sign in to comment.