This PR contains the work done to open the *Settings* view and also, implemented the rendering of its tab items. Reviewed-on: #5 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
32 lines
624 B
Swift
32 lines
624 B
Swift
//
|
|
// SampleDataModifier.swift
|
|
// Piper ~ App
|
|
//
|
|
// Created by Javier Cicchelli on 13/10/2024.
|
|
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
|
//
|
|
|
|
import SwiftData
|
|
import SwiftUI
|
|
|
|
struct SampleDataModifier: PreviewModifier {
|
|
|
|
// MARK: Functions
|
|
|
|
static func makeSharedContext() async throws -> ModelContainer {
|
|
let container = ModelContainer.preview
|
|
|
|
Repository.samples(in: container)
|
|
|
|
return container
|
|
}
|
|
|
|
func body(
|
|
content: Content,
|
|
context: ModelContainer
|
|
) -> some View {
|
|
content.modelContainer(context)
|
|
}
|
|
|
|
}
|