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
const paletteHelpers = { | |
wrapStyles(styles) { | |
StyleSheet.create(styles) | |
}, | |
createColor(styles) { | |
for (let classProp in styles) { | |
for (let styleProp in styles[classProp]) { | |
const style = styles[classProp][styleProp] | |
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 { StyleSheet } from 'react-native' | |
export const colors = { | |
dark: 'hsl(0, 0%, 0%)', | |
warm_grey_87: ' hsl(0, 0%, 53%)', | |
greyish_brown_87: 'rgba(87, 87, 87, 0.87)', | |
yellow_orange: 'hsl(0, 0%, 34%)', | |
brick: 'hsl(1, 67%, 47%)', | |
marigold: 'hsl(46, 100%, 50%)', |
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
const data = [4, 3, 5, 0, 1, 10, 8, 2, 9] | |
function insertedSort(data) { | |
for (let i = 0; i < data.length; i++) { | |
for (let j = i; j > 0 && data[j] < data[j - 1]; j--) { | |
[data[j], data[j - 1]] = [data[j - 1], data[j]] | |
} | |
} | |
return data | |
} |
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
const withHideHeader = (key, WrapComponent) => (props) => { | |
const { params = {} } = getCurrentState(props.scene.route) | |
if (params[key]) { | |
return null | |
} | |
return <WrapComponent {...props} /> | |
} | |
function getCurrentState(state = {}) { |
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
export const colors = { | |
dark: '#272b37', | |
warm_grey_87: 'rgba(134, 134, 134, 0.87)', | |
greyish_brown_87: 'rgba(87, 87, 87, 0.87)', | |
yellow_orange: 'rgb(250, 185, 0)', | |
brick: 'rgb(200, 43, 39)', | |
marigold: 'rgb(255, 197, 0)', | |
greyish_brown: 'rgb(57, 55, 53)', | |
dusty_orange: 'rgb(236, 106, 51)', | |
black_38: 'rgba(0, 0, 0, 0.38)', |
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
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<LinearGradient | |
colors={['#93C6F9', '#97B4FA', '#A768FE']} | |
start={[0, 0]} | |
end={[1, 0]} | |
style={{ padding: 15, alignItems: 'center', borderRadius: 5 }}> | |
<Text | |
style={{ | |
backgroundColor: 'transparent', | |
fontSize: 15, |
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
const exec = require('./promisify-exec') | |
const command = [] | |
async function start() { | |
for (let i = 0; i < command.length; i++) { | |
const data = await exec(command[i]) | |
console.log(data) | |
} |
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
// topRoute.routeName === 'Entry' || topRoute.routeName === 'Login' || topRoute.routeName === 'Main' | |
getScene(topRoute.routeName) | |
function getScene(routeName) { | |
const names = ['Entry', 'Login', 'Main'] | |
return names.indexOf(routeName !== -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
import { | |
createAction, | |
createActions, | |
handleAction, | |
handleActions, | |
combineActions | |
} from 'redux-actions' | |
import { combineReducers } from 'redux' | |
import axios from 'axios' |