Skip to content

Commit

Permalink
chore: run prettier on all files (#519)
Browse files Browse the repository at this point in the history
run prettier on all files.
  • Loading branch information
satya164 committed May 21, 2020
1 parent b1f9fdd commit eabe8ab
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions createNativeStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function renderComponentOrThunk(componentOrThunk, props) {
const REMOVE_ACTION = 'NativeStackNavigator/REMOVE';

class StackView extends React.Component {
_removeScene = route => {
_removeScene = (route) => {
this.props.navigation.dispatch({
type: REMOVE_ACTION,
immediate: true,
Expand Down Expand Up @@ -228,8 +228,8 @@ class StackView extends React.Component {
Platform.OS === 'android'
? false
: options.gestureEnabled === undefined
? true
: options.gestureEnabled
? true
: options.gestureEnabled
}
onAppear={() => this._onAppear(route, descriptor)}
onDismissed={() => this._removeScene(route)}>
Expand Down Expand Up @@ -278,7 +278,7 @@ function createStackNavigator(routeConfigMap, stackConfig = {}) {
const { key, immediate } = action;
let backRouteIndex = state.index;
if (key) {
const backRoute = state.routes.find(route => route.key === key);
const backRoute = state.routes.find((route) => route.key === key);
backRouteIndex = state.routes.indexOf(backRoute);
}

Expand Down
2 changes: 1 addition & 1 deletion native-stack/navigators/createNativeStackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function NativeStackNavigator(props: NativeStackNavigatorProps) {
React.useEffect(
() =>
navigation.addListener &&
navigation.addListener('tabPress', e => {
navigation.addListener('tabPress', (e) => {
const isFocused = navigation.isFocused();

// Run the operation in the next frame so we're sure all listeners have been run
Expand Down
8 changes: 4 additions & 4 deletions native-stack/views/HeaderConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ export default function HeaderConfig(props: Props) {
headerTitle !== undefined
? headerTitle
: title !== undefined
? title
: route.name
? title
: route.name
}
titleFontFamily={headerTitleStyle.fontFamily}
titleFontSize={headerTitleStyle.fontSize}
titleColor={
headerTitleStyle.color !== undefined
? headerTitleStyle.color
: headerTintColor !== undefined
? headerTintColor
: colors.text
? headerTintColor
: colors.text
}
backTitle={headerBackTitleVisible ? headerBackTitle : ' '}
backTitleFontFamily={headerBackTitleStyle.fontFamily}
Expand Down
2 changes: 1 addition & 1 deletion native-stack/views/NativeStackView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function NativeStackView({

return (
<ScreenStack style={styles.container}>
{state.routes.map(route => {
{state.routes.map((route) => {
const { options, render: renderScene } = descriptors[route.key];
const {
gestureEnabled,
Expand Down
12 changes: 6 additions & 6 deletions src/screens.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let ENABLE_SCREENS = false;

// UIManager[`${moduleName}`] is deprecated in RN 0.58 and `getViewManagerConfig` is added.
// We can remove this when we drop support for RN < 0.58.
const getViewManagerConfigCompat = name =>
const getViewManagerConfigCompat = (name) =>
typeof UIManager.getViewManagerConfig !== 'undefined'
? UIManager.getViewManagerConfig(name)
: UIManager[name];
Expand Down Expand Up @@ -85,7 +85,7 @@ class Screen extends React.Component {
setNativeProps(props) {
this._ref.setNativeProps(props);
}
setRef = ref => {
setRef = (ref) => {
this._ref = ref;
this.props.onComponentRef && this.props.onComponentRef(ref);
};
Expand Down Expand Up @@ -147,31 +147,31 @@ const styles = StyleSheet.create({
},
});

const ScreenStackHeaderBackButtonImage = props => (
const ScreenStackHeaderBackButtonImage = (props) => (
<ScreensNativeModules.NativeScreenStackHeaderSubview
type="back"
style={styles.headerSubview}>
<Image resizeMode="center" fadeDuration={0} {...props} />
</ScreensNativeModules.NativeScreenStackHeaderSubview>
);

const ScreenStackHeaderRightView = props => (
const ScreenStackHeaderRightView = (props) => (
<ScreensNativeModules.NativeScreenStackHeaderSubview
{...props}
type="right"
style={styles.headerSubview}
/>
);

const ScreenStackHeaderLeftView = props => (
const ScreenStackHeaderLeftView = (props) => (
<ScreensNativeModules.NativeScreenStackHeaderSubview
{...props}
type="left"
style={styles.headerSubview}
/>
);

const ScreenStackHeaderCenterView = props => (
const ScreenStackHeaderCenterView = (props) => (
<ScreensNativeModules.NativeScreenStackHeaderSubview
{...props}
type="center"
Expand Down

0 comments on commit eabe8ab

Please sign in to comment.