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
setAnchor = (anchorPos: 'small' | 'medium' | 'full') => { | |
switch (anchorPos) { | |
case 'full': | |
// Keyboard must always be dismissed for full map anchor. | |
Keyboard.dismiss(); | |
// Scroll to top for full map anchor | |
if (this.scrollContainer) { | |
this.scrollContainer.getNode().scrollTo({ y: 0, animated: true }); | |
} |
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
// @flow | |
import * as Sentry from '@sentry/react-native'; | |
import type { Store } from 'redux'; | |
type Action = { | |
type: string | |
}; | |
type 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
// @flow | |
import React, { Component } from 'react'; | |
import { StyleSheet } from 'react-native'; | |
import * as Animatable from 'react-native-animatable'; | |
import MaskedView from '@react-native-community/masked-view'; | |
import Svg, { Path } from 'react-native-svg'; | |
import moment from 'moment-timezone'; | |
import styled from 'styled-components'; | |
import { BlurView } from '@react-native-community/blur'; | |
import { connect } from 'react-redux'; |
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
class HoverableTouchable extends PureComponent { | |
hoverOpacity = new Animated.Value(1); | |
onMouseEnter = () => { | |
Animated.timing(this.hoverOpacity, { | |
toValue: 0.3, | |
duration: 100, | |
useNativeDriver: true // not available on web, make a check here, something like Platform.OS === 'web' ? ... | |
}).start() | |
} | |
onMouseLeave = () => { |
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
// @flow | |
import React, { PureComponent } from 'react'; | |
import styled from 'styled-components'; | |
import { connect } from 'react-redux'; | |
import memoize from 'memoize-one'; | |
import * as Animatable from 'react-native-animatable'; | |
import { type PlannerTravel, type TravelType, type PlannerEntity } from '../../../../../../flow/planner'; | |
import { type Flight } from '../../../../../../flow/flights'; |
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
// @flow | |
import React from 'react'; | |
import { Animated } from 'react-native'; | |
import styled from 'styled-components'; | |
import type { DeviceProps } from '../../../flow/general'; | |
import Stockholm from '../../assets/stockholm/stockholm'; | |
import IconButton from '../feedback/iconButton'; |
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 instanceFactory = (x) => { | |
this.a = 10; | |
this.b = x * 5; | |
this.c = () => { | |
return a + b; | |
} | |
} | |
const instance = new instanceFactory(3); | |
// basically returns an object with the following values appended to this. |
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
// @flow | |
import React, { Component } from 'react'; | |
import { createStackNavigator, NavigationActions, StackActions } from 'react-navigation'; | |
import styled from 'styled-components'; | |
import { connect } from 'react-redux'; | |
import type { NavigationScreenProp, DeviceProps } from '../../../flow/general'; | |
import Main from './screens/main'; | |
import EmailLogin from './screens/emailLogin'; |
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
// @flow | |
import React, { Component } from 'react'; | |
import { WebView } from 'react-native-webview'; | |
import styled from 'styled-components'; | |
import { connect } from 'react-redux'; | |
import * as Animatable from 'react-native-animatable'; | |
import Reactotron from 'reactotron-react-native'; | |
import type { NavigationScreenProp } from 'react-navigation'; | |
import type { DeviceProps } from '../../../flow/general'; |
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
// @flow | |
... | |
/* | |
this.animationKey is transitioned between 3 values: 0, 1, and 2. | |
0 is when dragger is not active. | |
1 is when a touch is active on dragger but not attached to a dropzone. | |
2 is when a touch is active on dragger and attached to dropzone. | |
*/ |