From 097727dbbefd9bec69f5a9bec06add3201626f36 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Mon, 28 Dec 2020 12:49:16 +0500 Subject: [PATCH] fix user account settings ui --- apps/mobile/src/views/Settings/index.js | 35 ++++++++++++++++--------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js index c435e770e..142682326 100644 --- a/apps/mobile/src/views/Settings/index.js +++ b/apps/mobile/src/views/Settings/index.js @@ -39,6 +39,7 @@ import SettingsService from '../../services/SettingsService'; import { AndroidModule, dWidth, + getElevation, MenuItemsList, setSetting, SUBSCRIPTION_STATUS_STRINGS, @@ -65,6 +66,7 @@ import { import {MMKV} from '../../utils/mmkv'; import {pv, SIZE, WEIGHT} from '../../utils/SizeUtils'; import Storage from '../../utils/storage'; +import {timeConverter} from '../../utils/TimeUtils'; const otherItems = [ { @@ -267,7 +269,7 @@ const AccoutLogoutSection = () => { borderRadius: 0, }}> @@ -404,21 +406,26 @@ const SettingsUserSection = () => { { @@ -471,22 +479,25 @@ const SettingsUserSection = () => { size={SIZE.lg} color={ getTimeLeft(parseInt(user.subscription.expiry)) > 5 - ? colors.pri - : colors.errorText + ? colors.accent + : colors.red }> {getTimeLeft(parseInt(user.subscription.expiry)) + ' Days Remaining'}{' '} - - Your trail period started on{' '} - {new Date( - user.subscription.start * 1000, - ).toLocaleDateString()} + + {user.subscription.type === 2 + ? 'You signed up for our Beta Program on ' + + timeConverter(user.subscription.start) + : user.subscription.type === 1 + ? 'Your trial period started on ' + + timeConverter(user.subscription.start) + : null} ) : null} - {user.isEmailConfirmed && ( + {user.isEmailConfirmed && user.subscription.type !== 2 && ( <>