Fix welcome screen bug

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-11 23:33:49 +03:00
parent 3da76e24df
commit 952bd591dd
4 changed files with 9 additions and 7 deletions

View File

@@ -7,13 +7,14 @@ import styles from '../styles';
import { noOp } from '../utilities';
import { updateStorageUri } from '../state';
const Welcome = () => {
const Welcome = ({ onWelcomeComplete }: { onWelcomeComplete: () => void }) => {
const dispatch = useDispatch();
const selectStorageLocation = async () => {
const uri = await openDocumentTree(true).catch(noOp);
if (!uri) return;
await dispatch(updateStorageUri(uri.uri));
onWelcomeComplete();
};
return (