This file contains hidden or 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
/***************************************** | |
* uploadPicturesToBucketV2 | |
* CURRENT WORKING VERSION | |
* post base64 encoded data to server | |
* This works when used in conjunction with technique from this post: | |
* http://stackoverflow.com/questions/26805005/sending-binary-data-to-amazon-s3-javascript | |
*/ | |
export const uploadPicturesToBucket = (fileArray, userId, jwt, loginType) => { | |
let promiseArray = fileArray.map((file, index, array) => { |
This file contains hidden or 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
public componentDidUpdate(prevProps, prevState) { | |
console.log('Rrow update diff:'); | |
const nowProps = Object.entries(this.props); | |
const addedProps = nowProps.filter(([key, val]) => { | |
if (prevProps[key] === undefined) { | |
return true; | |
} | |
if (prevProps[key] !== val) { |
This file contains hidden or 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
"packagerOpts": { | |
"projectRoots": "", | |
"config": "rn-cli.config.js", | |
}, |
This file contains hidden or 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
exports.modifyWebpackConfig = ({ config, _stage }) => { | |
console.log("*********config._config.context: ", config._config.context) | |
return config.merge({ | |
resolve: { | |
alias: { | |
shared: path.resolve(config._config.context, '../shared'), | |
}, | |
}, | |
}) | |
} |
This file contains hidden or 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 path = require('path'); | |
module.exports = { | |
// For React Native version 0.57 | |
projectRoot: path.resolve(__dirname), | |
// tell the builder to also look in the shared directory for imports | |
watchFolders: [ | |
path.resolve(__dirname, "../shared") | |
] |
This file contains hidden or 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
<Map | |
style={{ | |
width: '100%', | |
backgroundColor: 'lightblue' | |
}} | |
... | |
// handling a react-leaflet map click event | |
onClick={(event) => { | |
this.onMapEvent('onMapClicked', { | |
coords: [event.latlng.lat, event.latlng.lng] |
This file contains hidden or 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
handleMessage = (event) => { | |
let msgData; | |
try { | |
msgData = JSON.parse(event.nativeEvent.data); | |
if ( | |
msgData.hasOwnProperty('prefix') && | |
msgData.prefix === MESSAGE_PREFIX | |
) { | |
console.log(`WebViewLeaflet: received message: `, msgData.payload); |
This file contains hidden or 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 } from 'react'; | |
import { | |
View, | |
StyleSheet, | |
Modal, | |
Keyboard, | |
KeyboardAvoidingView, | |
Animated, | |
TouchableWithoutFeedback, | |
Easing |
This file contains hidden or 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
soundRecorderComplete = (soundFileInfo) => { | |
soundFileInfo = | |
typeof soundFileInfo === 'object' | |
? JSON.stringify(soundFileInfo, undefined, 2) | |
: soundFileInfo; | |
this.setState({ | |
viewToShow: 'home', | |
soundFileInfo | |
}); |
NewerOlder