diff --git a/apple/OmnivoreKit/Sources/Binders/Views/ProfileContainerView.swift b/apple/OmnivoreKit/Sources/Binders/Views/ProfileContainerView.swift
index 111483915..5832b0b63 100644
--- a/apple/OmnivoreKit/Sources/Binders/Views/ProfileContainerView.swift
+++ b/apple/OmnivoreKit/Sources/Binders/Views/ProfileContainerView.swift
@@ -56,11 +56,15 @@ struct ProfileContainerView: View {
}
Section {
- NavigationLink(destination: BasicWebAppView.privacyPolicyWebView) {
+ NavigationLink(
+ destination: BasicWebAppView.privacyPolicyWebView(baseURL: dataService.appEnvironment.webAppBaseURL)
+ ) {
Text("Privacy Policy")
}
- NavigationLink(destination: BasicWebAppView.termsConditionsWebView) {
+ NavigationLink(
+ destination: BasicWebAppView.termsConditionsWebView(baseURL: dataService.appEnvironment.webAppBaseURL)
+ ) {
Text("Terms and Conditions")
}
@@ -105,16 +109,21 @@ struct ProfileContainerView: View {
}
private extension BasicWebAppView {
- static let privacyPolicyWebView: BasicWebAppView = {
- omnivoreWebView(path: "privacy")
- }()
+ static func privacyPolicyWebView(baseURL: URL) -> BasicWebAppView {
+ omnivoreWebView(path: "/app/privacy", baseURL: baseURL)
+ }
- static let termsConditionsWebView: BasicWebAppView = {
- omnivoreWebView(path: "terms")
- }()
+ static func termsConditionsWebView(baseURL: URL) -> BasicWebAppView {
+ omnivoreWebView(path: "/app/terms", baseURL: baseURL)
+ }
- private static func omnivoreWebView(path: String) -> BasicWebAppView {
- let urlString = "https://omnivore.app/\(path)?isAppEmbedView=true"
- return BasicWebAppView(request: URLRequest(url: URL(string: urlString)!))
+ private static func omnivoreWebView(path: String, baseURL: URL) -> BasicWebAppView {
+ let urlRequest = URLRequest.webRequest(
+ baseURL: baseURL,
+ urlPath: path,
+ queryParams: nil
+ )
+
+ return BasicWebAppView(request: urlRequest)
}
}
diff --git a/packages/web/pages/app/privacy.tsx b/packages/web/pages/app/privacy.tsx
new file mode 100644
index 000000000..21a84facc
--- /dev/null
+++ b/packages/web/pages/app/privacy.tsx
@@ -0,0 +1,5 @@
+import { PrivacyPolicy } from '../../components/templates/PrivacyPolicy'
+
+export default function Privacy(): JSX.Element {
+ return
+}
diff --git a/packages/web/pages/app/terms.tsx b/packages/web/pages/app/terms.tsx
new file mode 100644
index 000000000..5abe635f8
--- /dev/null
+++ b/packages/web/pages/app/terms.tsx
@@ -0,0 +1,5 @@
+import { TermsAndConditions } from '../../components/templates/TermsAndConditions'
+
+export default function Terms(): JSX.Element {
+ return
+}