fix: show offline repo section if repo present

This commit is contained in:
Mo
2022-01-06 11:53:40 -06:00
parent 987f5aebf4
commit d5e58cf816
3 changed files with 9 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ interface IProps {
} }
export const OfflineSubscription: FunctionalComponent<IProps> = observer( export const OfflineSubscription: FunctionalComponent<IProps> = observer(
({ application, appState }) => { ({ application }) => {
const [activationCode, setActivationCode] = useState(''); const [activationCode, setActivationCode] = useState('');
const [isSuccessfullyActivated, setIsSuccessfullyActivated] = const [isSuccessfullyActivated, setIsSuccessfullyActivated] =
useState(false); useState(false);
@@ -33,7 +33,9 @@ export const OfflineSubscription: FunctionalComponent<IProps> = observer(
}, [application]); }, [application]);
const shouldShowOfflineSubscription = () => { const shouldShowOfflineSubscription = () => {
return !application.hasAccount() || application.isThirdPartyHostUsed(); return !application.hasAccount() ||
application.isThirdPartyHostUsed() ||
hasUserPreviouslyStoredCode;
}; };
const handleSubscriptionCodeSubmit = async ( const handleSubscriptionCodeSubmit = async (

View File

@@ -89,7 +89,7 @@
"@reach/tooltip": "^0.16.2", "@reach/tooltip": "^0.16.2",
"@standardnotes/features": "1.20.5", "@standardnotes/features": "1.20.5",
"@standardnotes/sncrypto-web": "1.5.3", "@standardnotes/sncrypto-web": "1.5.3",
"@standardnotes/snjs": "2.34.0", "@standardnotes/snjs": "2.34.1",
"mobx": "^6.3.5", "mobx": "^6.3.5",
"mobx-react-lite": "^3.2.2", "mobx-react-lite": "^3.2.2",
"preact": "^10.5.15", "preact": "^10.5.15",

View File

@@ -2655,10 +2655,10 @@
buffer "^6.0.3" buffer "^6.0.3"
libsodium-wrappers "^0.7.9" libsodium-wrappers "^0.7.9"
"@standardnotes/snjs@2.34.0": "@standardnotes/snjs@2.34.1":
version "2.34.0" version "2.34.1"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.34.0.tgz#ba5ccc3e82a190d3284cea2936e3453ed49b0b2c" resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.34.1.tgz#d65ccc52ef316019f3461205d472ba0a1ba4164c"
integrity sha512-1qIahN+TFy51FZcouWSGpIqxe5kDZAl07n3quzv3WszzvfIeB2X+40bmhJAj7/qbWjvNfoA60jKZYxiAbMIiJQ== integrity sha512-4IZ0b7G4Pp8zzrcacePQttm7LCF9vROL42BBALUrOIRDB6L22s978jM9bGYGIveI0FJI3mRnW4i1pXnoJzrqLA==
dependencies: dependencies:
"@standardnotes/auth" "3.8.1" "@standardnotes/auth" "3.8.1"
"@standardnotes/common" "1.2.1" "@standardnotes/common" "1.2.1"