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 { Header, Icon, Left } from "native-base"; | |
import React, { Component } from "react"; | |
import { | |
ActivityIndicator, | |
Image, | |
Keyboard, | |
Platform, | |
StyleSheet, | |
View | |
} from "react-native"; |
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, { PureComponent } from "react"; | |
import { Animated, Easing, TouchableWithoutFeedback, View } from "react-native"; | |
import { radius, styles } from "./styles.js"; | |
export default class Ripple extends PureComponent { | |
static defaultProps = { | |
...TouchableWithoutFeedback.defaultProps, | |
rippleColor: "rgb(0, 0, 0)", |
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 React-Redux": { | |
"prefix": "importReactRedux", | |
"body": [ | |
"import { connect } from 'react-redux';", | |
"import { bindActionCreators, compose } from 'redux';" | |
], | |
"description": "Import react-redux" | |
}, | |
"mapStateToProps": { |
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
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.formatOnSave": true, | |
"editor.tabSize": 2, | |
"editor.wordWrap": "on", | |
"editor.renderWhitespace": "none", | |
"git.enableSmartCommit": true, | |
"git.autofetch": true, | |
"terminal.integrated.fontFamily": "MesloLGM Nerd Font", | |
"color-highlight.markerType": "outline" |
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
m = [{ | |
type: "amex", | |
pattern: /^3[47]/, | |
format: /(\d{1,4})(\d{1,6})?(\d{1,5})?/, | |
length: [15], | |
cvcLength: [4], | |
luhn: true | |
}, { | |
type: "jcb", | |
pattern: /^35/, |
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
handleDownloadAttachment = (file) => { | |
Alert.alert( | |
'Tải tệp đính kèm', `Tải tệp: ${file.filename}?`, | |
[{ | |
text: 'Hủy', | |
onPress: () => {} | |
}, | |
{ | |
text: 'Tải', | |
onPress: () => RNFetchBlob |
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
function distance(lat1, lon1, lat2, lon2, unit) { | |
var radlat1 = Math.PI * lat1 / 180 | |
var radlat2 = Math.PI * lat2 / 180 | |
var theta = lon1 - lon2 | |
var radtheta = Math.PI * theta / 180 | |
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); | |
if (dist > 1) { | |
dist = 1; | |
} | |
dist = Math.acos(dist) |
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
platform :ios, '9.0' | |
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | |
target 'demo_app' do | |
# Pods for demo_app | |
pod 'React', :path => '../node_modules/react-native/' | |
pod 'React-Core', :path => '../node_modules/react-native/React' | |
pod 'React-DevSupport', :path => '../node_modules/react-native/React' | |
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook' | |
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' |
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 React, { Component, useState } from "react"; | |
import { | |
Text, | |
StyleSheet, | |
TouchableOpacity, | |
TouchableNativeFeedback | |
} from "react-native"; | |
import Animated, { Easing } from "react-native-reanimated"; | |
import { Block } from "../../components/common"; | |
import LottieView from "lottie-react-native"; |
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
function immutableMove(arr, from, to) { | |
return arr.reduce((prev, current, idx, self) => { | |
if (from === to) { | |
prev.push(current); | |
} | |
if (idx === from) { | |
return prev; | |
} | |
if (from < to) { | |
prev.push(current); |
OlderNewer