generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Home.swift
41 lines (33 loc) · 1.07 KB
/
Home.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// This source file is part of the LifeSpace based on the Stanford Spezi Template Application project
//
// SPDX-FileCopyrightText: 2023 Stanford University
//
// SPDX-License-Identifier: MIT
//
@_spi(TestingSupport) import SpeziAccount
import SwiftUI
struct HomeView: View {
@State private var presentingAccount = false
var body: some View {
LifeSpaceMapView(presentingAccount: $presentingAccount)
.sheet(isPresented: $presentingAccount) {
AccountSheet()
}
.accountRequired(!FeatureFlags.disableFirebase && !FeatureFlags.skipOnboarding) {
AccountSheet()
}
}
}
#if DEBUG
#Preview {
var details = AccountDetails()
details.userId = "[email protected]"
details.name = PersonNameComponents(givenName: "Leland", familyName: "Stanford")
return HomeView()
.previewWith(standard: LifeSpaceStandard()) {
LifeSpaceScheduler()
AccountConfiguration(service: InMemoryAccountService(), activeDetails: details)
}
}
#endif