This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
import styled from 'styled-components'; | |
const Modal = styled.Modal.attrs(() => ({ | |
transparent: true, | |
}))``; | |
const Wrapper = styled.TouchableOpacity` | |
flex: 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add those aliases to your favorite alias file | |
# nvm is required | |
alias get-required-node="node -pe \"try { require('./package.json').engines.node.replace(/[>=]/g, ''); } catch (e) { }\"" | |
alias use-required-node='[[ `get-required-node` != undefined ]] && nvm use `get-required-node` || echo "No package.json here"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This function returns a flat array given an array of arbitrarily nested arrays | |
* e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
*/ | |
const flattenArray = arr => { | |
const result = [] | |
arr.map(item => { | |
if (Array.isArray(item)) { | |
result.push(...flattenArray(item)) | |
} else { |