- Cleanup
This commit is contained in:
@@ -3,20 +3,22 @@ import PropTypes from 'prop-types';
|
||||
|
||||
import { Header } from 'react-native-elements';
|
||||
|
||||
import HeaderTitle from './HeaderTitle.container.js';
|
||||
import HeaderTitle from './HeaderTitle/HeaderTitle.container.js';
|
||||
import HeaderContentLeft from './HeaderContentLeft.container.js';
|
||||
import HeaderContentRight from './HeaderContentRight.container.js';
|
||||
|
||||
import styles from './AppHeader.styles.js';
|
||||
|
||||
export default function AppHeader({ navigation }) (
|
||||
<Header
|
||||
placement="left"
|
||||
leftComponent={<HeaderContentRight navigation={navigation} />}
|
||||
centerComponent={<HeaderTitle navigation={navigation} />}
|
||||
rightComponent={<HeaderContentLeft navigation={navigation} />}
|
||||
/>
|
||||
)
|
||||
export default function AppHeader({ navigation }) {
|
||||
return (
|
||||
<Header
|
||||
placement="left"
|
||||
leftComponent={<HeaderContentRight navigation={navigation} />}
|
||||
centerComponent={<HeaderTitle navigation={navigation} />}
|
||||
rightComponent={<HeaderContentLeft navigation={navigation} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
AppHeader.propTypes = {
|
||||
navigation: PropTypes.func.isRequired,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { hasMultipleEvents } from '../selectors/events.js';
|
||||
import { hasMultipleEvents } from '../../selectors/events.js';
|
||||
|
||||
import HeaderContentLeft from './HeaderContentLeft.js';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { getProfileAvatarUrl } from '../selectors/profile.js';
|
||||
import { getProfileAvatarUrl } from '../../selectors/profile.js';
|
||||
|
||||
import HeaderContentRight from './HeaderContentRight.js';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { getActiveEvent, getDefaultEvent } from '../selectors/events.js';
|
||||
import { getActiveEvent, getDefaultEvent } from '../../../../selectors/events.js';
|
||||
|
||||
import EventTitle from './EventTitle.js';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { StyleSheet } from 'react-native';
|
||||
|
||||
export default const styles = StyleSheet.create({
|
||||
export const styles = StyleSheet.create({
|
||||
eventInfo: {
|
||||
flexDirection: 'row',
|
||||
},
|
||||
@@ -12,4 +12,3 @@ export default const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { hasActiveEvent } from '../selectors/activeEvent.js';
|
||||
import { hasMultipleEvents } from '../selectors/events.js';
|
||||
import { hasActiveEvent } from '../../../selectors/activeEvent.js';
|
||||
import { hasMultipleEvents } from '../../../selectors/events.js';
|
||||
|
||||
import HeaderTitle from './HeaderTitle.js';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
|
||||
import EventTitle from './EventTitle/EventTitle.container.js';
|
||||
|
||||
import styles from './TitleBar.styles.js';
|
||||
import styles from './HeaderTitle.styles.js';
|
||||
|
||||
export default function HeaderTitle({
|
||||
activeRoute,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { StyleSheet } from 'react-native';
|
||||
|
||||
export default const styles = StyleSheet.create({
|
||||
export const styles = StyleSheet.create({
|
||||
filterBar: {
|
||||
backgroundColor: '#0F0',
|
||||
flexDirection: 'row',
|
||||
|
||||
@@ -4,11 +4,13 @@ import PropTypes from 'prop-types';
|
||||
import { TouchableOpacity } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
|
||||
export default function BackIcon({ action }) (
|
||||
<TouchableOpacity onPress={action}>
|
||||
<Icon name="ei-chevron-left" type="evilicons" size={28} />;
|
||||
</TouchableOpacity>
|
||||
)
|
||||
export default function BackIcon({ action }) {
|
||||
return (
|
||||
<TouchableOpacity onPress={action}>
|
||||
<Icon name="ei-chevron-left" type="evilicons" size={28} />;
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
BackIcon.propTypes = {
|
||||
action: PropTypes.func.isRequired,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { getProfileAvatarUrl } from '../selectors/profile.js';
|
||||
import { getProfileAvatarUrl } from '../../../selectors/profile.js';
|
||||
|
||||
import HeaderContentRight from './HeaderContentRight.js';
|
||||
import UserProfileButton from './UserProfileButton.js';
|
||||
|
||||
const matchStateToProps = (state) => ({
|
||||
avatarUrl: getProfileAvatarUrl(state),
|
||||
});
|
||||
|
||||
export default connect(matchStateToProps, null)(HeaderContentRight);
|
||||
export default connect(matchStateToProps, null)(UserProfileButton);
|
||||
|
||||
@@ -20,16 +20,16 @@ export default function UserProfileButton({ avatarUrl, navigation }) {
|
||||
<Image source={{ uri: avatarUrl }} />
|
||||
</View>
|
||||
) : (
|
||||
<Icon name="ei-user" type="evilicons" size={28} />;
|
||||
<Icon name="ei-user" type="evilicons" size={28} />
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
HeaderContentRight.propTypes = {
|
||||
UserProfileButton.propTypes = {
|
||||
avatarUrl: PropTypes.string,
|
||||
};
|
||||
|
||||
HeaderContentRight.propTypes = {
|
||||
UserProfileButton.propTypes = {
|
||||
avatarUrl: null,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user