import React from 'react'; import { StyleSheet, View } from 'react-native'; import { Button, Text, useTheme } from 'react-native-paper'; import { useDispatch } from 'react-redux'; import { openDocumentTree } from 'react-native-scoped-storage'; import { noOp } from '../utilities'; import { setStorageUri } from '../state'; const welcomeStyles = StyleSheet.create({ view: { paddingHorizontal: '4%', alignItems: 'center', justifyContent: 'center', flex: 1, }, text: { marginBottom: 30, textAlign: 'center', }, button: { marginBottom: 100, }, }); const Welcome = ({ onWelcomeComplete }: { onWelcomeComplete: () => void }) => { const { colors } = useTheme(); const dispatch = useDispatch(); const selectStorageLocation = async () => { const uri = await openDocumentTree(true).catch(noOp); if (!uri) return; await dispatch(setStorageUri(uri.uri)); onWelcomeComplete(); }; return ( Welcome to Terminally Online! ); }; export default Welcome;