Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: switch toggle on/off by clicking on the toggle

thecodrr9879eb06f15c
diff --git a/apps/web/src/components/toggle/index.js b/apps/web/src/components/toggle/index.js
index 13cc1f071..d431fc657 100644
--- a/apps/web/src/components/toggle/index.js
+++ b/apps/web/src/components/toggle/index.js
@@ -32,6 +32,12 @@ function Toggle(props) {
<Tip text={title} tip={isToggled ? onTip : offTip} />
<ReactToggle
size={20}
+ onClick={async () => {
+ if (isUserPremium() || !premium) onToggled();
+ else {
+ await showBuyDialog();
+ }
+ }}
onChange={() => {}}
checked={isToggled}
icons={false}