feat: Refactors / renames some modules.

This commit is contained in:
2025-02-26 08:27:39 -05:00
parent 30cfde9f30
commit cce99ce5e9
12 changed files with 32 additions and 53 deletions

View File

@@ -0,0 +1,32 @@
import Dependencies
import DependenciesMacros
import Elementary
import Routes
public extension DependencyValues {
var viewController: ViewController {
get { self[ViewController.self] }
set { self[ViewController.self] = newValue }
}
}
public typealias AnySendableHTML = (any HTML & Sendable)
@DependencyClient
public struct ViewController: Sendable {
public var view: @Sendable (SiteRoute.View) async throws -> AnySendableHTML
}
extension ViewController: TestDependencyKey {
public static let testValue: ViewController = Self()
}
extension ViewController: DependencyKey {
public static var liveValue: ViewController {
.init(view: { _ in
MainPage {
MoldRiskForm()
}
})
}
}