|
@@ -10,8 +10,7 @@ import SwiftUI
|
|
|
|
|
|
|
|
final class ModalProductsCoordinator: BaseCoordinator {
|
|
final class ModalProductsCoordinator: BaseCoordinator {
|
|
|
|
|
|
|
|
- func run() -> some View
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ func run() -> some View {
|
|
|
showProductsModule()
|
|
showProductsModule()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -29,7 +28,8 @@ final class ModalProductsCoordinator: BaseCoordinator {
|
|
|
|
|
|
|
|
private func showProductsModule() -> some View {
|
|
private func showProductsModule() -> some View {
|
|
|
ProductsBuilder().build(
|
|
ProductsBuilder().build(
|
|
|
- with: .init(
|
|
|
|
|
|
|
+ with: .init(showCart: false),
|
|
|
|
|
+ output: .init(
|
|
|
onProduct: { [weak self] in
|
|
onProduct: { [weak self] in
|
|
|
self?.currentRouter.push(Route.product(id: $0))
|
|
self?.currentRouter.push(Route.product(id: $0))
|
|
|
}
|
|
}
|
|
@@ -39,7 +39,11 @@ final class ModalProductsCoordinator: BaseCoordinator {
|
|
|
|
|
|
|
|
private func showProductModule(with id: Int) -> some View {
|
|
private func showProductModule(with id: Int) -> some View {
|
|
|
ProductBuilder().build(
|
|
ProductBuilder().build(
|
|
|
- with: .init(id: id),
|
|
|
|
|
|
|
+ with: .init(
|
|
|
|
|
+ id: id,
|
|
|
|
|
+ showCart: false,
|
|
|
|
|
+ showProducts: false
|
|
|
|
|
+ ),
|
|
|
output: .init()
|
|
output: .init()
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|