-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1694 from p2p-org/feature/pwn-942
[ETH-942] Terms&Conditions for referral program
- Loading branch information
Showing
10 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...cenes/Main/ReferralProgram/Details/TermsAndConditions/TermsAndConditionsCoordinator.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Combine | ||
import SwiftUI | ||
import UIKit | ||
|
||
final class TermsAndConditionsCoordinator: Coordinator<Void> { | ||
private let navigationController: UINavigationController | ||
private let result = PassthroughSubject<Void, Never>() | ||
private let url: URL | ||
|
||
init(navigationController: UINavigationController, url: URL) { | ||
self.navigationController = navigationController | ||
self.url = url | ||
} | ||
|
||
override func start() -> AnyPublisher<Void, Never> { | ||
let view = TermsAndConditionsView(url: url) | ||
let vc = UIHostingController(rootView: view) | ||
navigationController.pushViewController(vc, animated: true) | ||
return result.eraseToAnyPublisher() | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...allet/Scenes/Main/ReferralProgram/Details/TermsAndConditions/TermsAndConditionsView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Foundation | ||
import SwiftUI | ||
import WebKit | ||
|
||
struct TermsAndConditionsView: View { | ||
private let url: URL | ||
init(url: URL) { | ||
self.url = url | ||
} | ||
|
||
var body: some View { | ||
ColoredBackground( | ||
{ | ||
ReferralWebView(webView: WKWebView(), link: url) | ||
.ignoresSafeArea(edges: .bottom) | ||
}, | ||
color: Color(uiColor: UIColor(resource: .f2F5Fa)) | ||
) | ||
.navigationTitle(L10n.termsConditions) | ||
.navigationBarTitleDisplayMode(.inline) | ||
} | ||
} |