Refactor validation

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-21 16:34:44 +03:00
parent b7dd1c77af
commit 3c303e0304
17 changed files with 256 additions and 151 deletions

View File

@@ -5,7 +5,7 @@ import { useDispatch } from 'react-redux';
import { openDocumentTree } from 'react-native-scoped-storage';
import styles from '../styles';
import { noOp } from '../utilities';
import { updateStorageUri } from '../state';
import { setStorageUri } from '../state';
import { useDimensions } from '../contexts';
const Welcome = ({ onWelcomeComplete }: { onWelcomeComplete: () => void }) => {
@@ -16,7 +16,7 @@ const Welcome = ({ onWelcomeComplete }: { onWelcomeComplete: () => void }) => {
const selectStorageLocation = async () => {
const uri = await openDocumentTree(true).catch(noOp);
if (!uri) return;
await dispatch(updateStorageUri(uri.uri));
await dispatch(setStorageUri(uri.uri));
onWelcomeComplete();
};