From d5e58cf816a90c51b55e303108a20b4b70f93a8b Mon Sep 17 00:00:00 2001 From: Mo Date: Thu, 6 Jan 2022 11:53:40 -0600 Subject: [PATCH] fix: show offline repo section if repo present --- .../preferences/panes/account/offlineSubscription.tsx | 6 ++++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/preferences/panes/account/offlineSubscription.tsx b/app/assets/javascripts/preferences/panes/account/offlineSubscription.tsx index 173bd60a1..5744600c3 100644 --- a/app/assets/javascripts/preferences/panes/account/offlineSubscription.tsx +++ b/app/assets/javascripts/preferences/panes/account/offlineSubscription.tsx @@ -18,7 +18,7 @@ interface IProps { } export const OfflineSubscription: FunctionalComponent = observer( - ({ application, appState }) => { + ({ application }) => { const [activationCode, setActivationCode] = useState(''); const [isSuccessfullyActivated, setIsSuccessfullyActivated] = useState(false); @@ -33,7 +33,9 @@ export const OfflineSubscription: FunctionalComponent = observer( }, [application]); const shouldShowOfflineSubscription = () => { - return !application.hasAccount() || application.isThirdPartyHostUsed(); + return !application.hasAccount() || + application.isThirdPartyHostUsed() || + hasUserPreviouslyStoredCode; }; const handleSubscriptionCodeSubmit = async ( diff --git a/package.json b/package.json index 34cb50637..557a57845 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@reach/tooltip": "^0.16.2", "@standardnotes/features": "1.20.5", "@standardnotes/sncrypto-web": "1.5.3", - "@standardnotes/snjs": "2.34.0", + "@standardnotes/snjs": "2.34.1", "mobx": "^6.3.5", "mobx-react-lite": "^3.2.2", "preact": "^10.5.15", diff --git a/yarn.lock b/yarn.lock index 461b57102..0f792794d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2655,10 +2655,10 @@ buffer "^6.0.3" libsodium-wrappers "^0.7.9" -"@standardnotes/snjs@2.34.0": - version "2.34.0" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.34.0.tgz#ba5ccc3e82a190d3284cea2936e3453ed49b0b2c" - integrity sha512-1qIahN+TFy51FZcouWSGpIqxe5kDZAl07n3quzv3WszzvfIeB2X+40bmhJAj7/qbWjvNfoA60jKZYxiAbMIiJQ== +"@standardnotes/snjs@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.34.1.tgz#d65ccc52ef316019f3461205d472ba0a1ba4164c" + integrity sha512-4IZ0b7G4Pp8zzrcacePQttm7LCF9vROL42BBALUrOIRDB6L22s978jM9bGYGIveI0FJI3mRnW4i1pXnoJzrqLA== dependencies: "@standardnotes/auth" "3.8.1" "@standardnotes/common" "1.2.1"