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
feat: allow plan adjustment via hash
thecodrrdc9935eefa07
diff --git a/apps/web/src/common/dialogcontroller.js b/apps/web/src/common/dialogcontroller.jsindex a16f7727d..3de7b6927 100644--- a/apps/web/src/common/dialogcontroller.js+++ b/apps/web/src/common/dialogcontroller.js@@ -90,9 +90,10 @@ export function showAddNotebookDialog() {));}-export function showBuyDialog(couponCode) {+export function showBuyDialog(plan, couponCode) {return showDialog((Dialogs, perform) => (<Dialogs.BuyDialog+ plan={plan}couponCode={couponCode}onCancel={() => perform(false)}/>diff --git a/apps/web/src/components/dialogs/buydialog.js b/apps/web/src/components/dialogs/buydialog.jsindex a007d6efd..617146f8e 100644--- a/apps/web/src/components/dialogs/buydialog.js+++ b/apps/web/src/components/dialogs/buydialog.js@@ -114,7 +114,7 @@ function BuyDialog(props) {const [isLoading, setIsLoading] = useState(false);const [error, setError] = useState();const [prices, setPrices] = useState();- const [plan, setPlan] = useState("monthly");+ const [plan, setPlan] = useState(props.plan || "monthly");const isLoggedIn = useUserStore((store) => store.isLoggedIn);const user = useUserStore((store) => store.user);diff --git a/apps/web/src/navigation/hash-routes.js b/apps/web/src/navigation/hash-routes.jsindex 43a3251a3..bbd0e9302 100644--- a/apps/web/src/navigation/hash-routes.js+++ b/apps/web/src/navigation/hash-routes.js@@ -111,7 +111,10 @@ const hashroutes = {showBuyDialog();},"/buy/:code": ({ code }) => {- showBuyDialog(code);+ showBuyDialog("monthly", code);+ },+ "/buy/:plan/:code": ({ plan, code }) => {+ showBuyDialog(plan, code);},};