Register client, userId, imageService in DIContainer on login
This commit is contained in:
parent
44b5a02ab6
commit
5f8cbf0b1e
2 changed files with 3 additions and 1 deletions
|
|
@ -23,6 +23,9 @@ struct Luminate: App {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
ServerSetupView { client, id in
|
ServerSetupView { client, id in
|
||||||
|
DIContainer.shared.register(\.client, value: client)
|
||||||
|
DIContainer.shared.register(\.userId, value: id)
|
||||||
|
DIContainer.shared.register(\.imageService, value: ImageService())
|
||||||
self.client = client
|
self.client = client
|
||||||
self.userId = id
|
self.userId = id
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@MainActor
|
|
||||||
public final class DIContainer {
|
public final class DIContainer {
|
||||||
|
|
||||||
public static let shared = DIContainer()
|
public static let shared = DIContainer()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue