From dab42a2e356c5192d7795f58694a0bec0de01e27 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Sun, 10 May 2020 22:21:31 +0500 Subject: [PATCH] minor refactor --- .../components/ActionSheetComponent/index.js | 7 +++---- .../src/components/LoginDialog/index.js | 20 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js index e06f1e4b6..7c3b820bb 100644 --- a/apps/mobile/src/components/ActionSheetComponent/index.js +++ b/apps/mobile/src/components/ActionSheetComponent/index.js @@ -90,14 +90,14 @@ export const ActionSheetComponent = ({ if (tag.includes(',')) { tag = tag.replace(',', ''); } - tagsInputRef.current?.setNativeProps({ - text: '', - }); await db.notes.note(note.id).tag(tag); setNote({...db.notes.note(note.id).data}); dispatch({type: ACTIONS.TAGS}); + tagsInputRef.current?.setNativeProps({ + text: '', + }); tagToAdd = ''; }; @@ -351,7 +351,6 @@ export const ActionSheetComponent = ({ .catch(async e => { switch (e.message) { case db.vault.ERRORS.noVault: - close('novault'); break; case db.vault.ERRORS.vaultLocked: diff --git a/apps/mobile/src/components/LoginDialog/index.js b/apps/mobile/src/components/LoginDialog/index.js index 74a3b3713..c8362c4ba 100644 --- a/apps/mobile/src/components/LoginDialog/index.js +++ b/apps/mobile/src/components/LoginDialog/index.js @@ -1,4 +1,4 @@ -import React, { createRef } from 'react'; +import React, {createRef} from 'react'; import {Modal, TouchableOpacity, View} from 'react-native'; import * as Animatable from 'react-native-animatable'; import {normalize} from '../../common/common'; @@ -12,13 +12,17 @@ import Signup from '../../views/Signup'; import {updateEvent} from '../DialogManager/recievers'; import {NavigationContainer} from '@react-navigation/native'; import {createStackNavigator} from '@react-navigation/stack'; +import Container from '../Container'; const Stack = createStackNavigator(); - const modalNavigatorRef2 = createRef(); + const ModalNavigator = ({onStateChange}) => { return ( - + - { + + { this.routeIndex = event.index; - }} - /> + }} + /> +