Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Screen(props: Props): React.ReactElement {
const [isUpdating, setIsUpdating] = useState(false);
const [displayName, setDisplayName] = useState('');
const [statusMsg, setStatusMsg] = useState('');
const { showActionSheetWithOptions } = useActionSheet();
const [profilePath, setProfilePath] = useState('');
useEffect(() => {
if (isUpdating) {
try {
if (props.navigation) {
props.navigation.goBack();
}
} catch (err) {
// console.error(err);
} finally {
setIsUpdating(false);
}
}
}, [isUpdating]);