Commit e00c479c authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'refactor-dispatch-props' into 'master'

Refactor some stuff

Closes #96, #95, and #94

See merge request !234
parents 40a59f7d 23d03d29
import { connect } from 'react-redux';
import { retrievePizzaInfo } from '../../../actions/pizza';
import * as actions from '../../../actions/event';
import * as pizzaActions from '../../../actions/pizza';
import * as eventActions from '../../../actions/event';
import EventDetailCard from './EventDetailCard';
const mapDispatchToProps = dispatch => ({
loadEvent: pk => dispatch(actions.event(pk)),
retrievePizzaInfo: () => dispatch(retrievePizzaInfo()),
});
const mapDispatchToProps = {
loadEvent: eventActions.event,
retrievePizzaInfo: pizzaActions.retrievePizzaInfo,
};
export default connect(() => ({}), mapDispatchToProps)(EventDetailCard);
......@@ -11,7 +11,7 @@ import {
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import Moment from 'moment';
import EventDetailCard from './EventDetailCardContainer';
import EventDetailCard from './EventDetailCardConnector';
import LoadingScreen from '../../components/loadingScreen/LoadingScreen';
import ErrorScreen from '../../components/errorScreen/ErrorScreen';
import styles from './style/Welcome';
......@@ -65,9 +65,9 @@ Footer.propTypes = {
t: PropTypes.func.isRequired,
};
const mapDispatchToFooterProps = dispatch => ({
openCalendar: () => dispatch(calendarActions.open()),
});
const mapDispatchToFooterProps = {
openCalendar: calendarActions.open,
};
const FooterComponent = connect(() => ({}), mapDispatchToFooterProps)(translate('screens/welcome/WelcomeScreen')(Footer));
......
......@@ -8,8 +8,8 @@ const mapStateToProps = state => ({
status: state.welcome.status,
});
const mapDispatchToProps = dispatch => ({
refresh: () => dispatch(welcomeActions.refresh()),
});
const mapDispatchToProps = {
refresh: welcomeActions.refresh,
};
export default connect(mapStateToProps, mapDispatchToProps)(WelcomeScreen);
......@@ -2,6 +2,9 @@ import { Platform, StyleSheet as ReactStyleSheet } from 'react-native';
export default class StyleSheet {
static create(styles) {
if (styles === undefined) {
return ReactStyleSheet.create();
}
const platformStyles = {};
Object.keys(styles).forEach((name) => {
// eslint-disable-next-line prefer-const
......
const blacklist = require('metro-config/src/defaults/blacklist');
// blacklist is a function that takes an array of regexes and combines
// them with the default blacklist to return a single regex.
module.exports = {
resolver: {
blacklistRE: blacklist([
/.gradle\/.*/,
]),
},
};
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment