fake auth session store for lightweight previews without the database listeners and all
This commit is contained in:
@@ -36,6 +36,13 @@ final class AuthSessionStore: ObservableObject, SessionStore {
|
|||||||
|
|
||||||
private var firestoreService: FirestoreService = FirestoreService()
|
private var firestoreService: FirestoreService = FirestoreService()
|
||||||
|
|
||||||
|
init(isPreview: Bool) {
|
||||||
|
let fakeUser = User(id: UUID().uuidString, nickname: "arjunya", phoneNumber: "+19302919293")
|
||||||
|
self.user = User()
|
||||||
|
let clientID = FirebaseApp.app()?.options.clientID
|
||||||
|
self.GIDconfig = GIDConfiguration(clientID: clientID!)
|
||||||
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
// create google sign in configuration object
|
// create google sign in configuration object
|
||||||
let clientID = FirebaseApp.app()?.options.clientID
|
let clientID = FirebaseApp.app()?.options.clientID
|
||||||
@@ -43,8 +50,6 @@ final class AuthSessionStore: ObservableObject, SessionStore {
|
|||||||
|
|
||||||
print("the google client id: prolly shouldn't be printing this: \(clientID)")
|
print("the google client id: prolly shouldn't be printing this: \(clientID)")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self.setupAuthListen()
|
self.setupAuthListen()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ struct InnerCircleView: View {
|
|||||||
|
|
||||||
struct InnerCircleView_Previews: PreviewProvider {
|
struct InnerCircleView_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
InnerCircleView().environmentObject(AuthSessionStore())
|
InnerCircleView().environmentObject(AuthSessionStore(isPreview: true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user