Skip to content

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

fix -0 days showing when subscription is expired

ammarahm-ed208d0cc31bd9
diff --git a/apps/mobile/babel.config.js b/apps/mobile/babel.config.js
index 8bb68016c..7c6341171 100644
--- a/apps/mobile/babel.config.js
+++ b/apps/mobile/babel.config.js
@@ -1,6 +1,6 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
- //"transform-remove-console"
+ "transform-remove-console"
]
};
diff --git a/apps/mobile/src/components/ResultDialog/index.js b/apps/mobile/src/components/ResultDialog/index.js
index 5e2f72695..24fbd63ed 100644
--- a/apps/mobile/src/components/ResultDialog/index.js
+++ b/apps/mobile/src/components/ResultDialog/index.js
@@ -17,7 +17,7 @@ import Paragraph from '../Typography/Paragraph';
const ResultDialog = () => {
const [state, dispatch] = useTracked();
const {colors} = state;
- const [visible, setVisible] = useState(true);
+ const [visible, setVisible] = useState(false);
const [dialogData, setDialogData] = useState({
title: 'Welcome to your private\nnote taking haven',
paragraph: 'Please confirm your email to encrypt and sync all your notes.',
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index 395129e37..70e599f38 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -523,8 +523,7 @@ const SettingsUserSection = () => {
let d2 = new Date(t2);
let diff = d2.getTime() - d1.getTime();
diff = (diff / (1000 * 3600 * 24)).toFixed(0);
-
- return diff < 0 ? 0 : diff;
+ return diff < 1 ? 0 : diff;
};
return (
@@ -688,7 +687,7 @@ const SettingsUserSection = () => {
? 'Your trial period started on ' +
timeConverter(user.subscription.start)
: user.subscription.type === 6
- ? 'Your account will be downgraded to Basic in 3 days.'
+ ? 'Your account will be downgraded to Basic in 3 days'
: user.subscription.type === 7
? 'You have cancelled your subscription.'
: user.subscription.type === 5