A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: post success message on checkout complete on react native
Abdullah Atta383b914c5225
diff --git a/apps/web/src/global.d.ts b/apps/web/src/global.d.tsindex 508c474aa..d8c4a4f07 100644--- a/apps/web/src/global.d.ts+++ b/apps/web/src/global.d.ts@@ -73,5 +73,8 @@ declare global {ApplePaySession?: {canMakePayments(): boolean | Promise<boolean>;};+ ReactNativeWebView?: {+ postMessage(message: string): void;+ };}}diff --git a/apps/web/src/views/checkout.tsx b/apps/web/src/views/checkout.tsxindex 3d54720de..c671cb581 100644--- a/apps/web/src/views/checkout.tsx+++ b/apps/web/src/views/checkout.tsx@@ -263,7 +263,15 @@ function Checkout() {<CheckoutDetailsuser={customer}onComplete={() => {- setCurrentStep(2);+ if (window.ReactNativeWebView) {+ window.ReactNativeWebView.postMessage(+ JSON.stringify({+ success: true+ })+ );+ } else {+ setCurrentStep(2);+ }}}/></Flex>