Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions src/organization/screens/organization-profile.screen.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { Component } from 'react';
import styled from 'styled-components/native';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { StyleSheet, RefreshControl } from 'react-native';
import { RefreshControl } from 'react-native';
import { ListItem } from 'react-native-elements';
import { createStructuredSelector } from 'reselect';
import ActionSheet from 'react-native-actionsheet';
Expand Down Expand Up @@ -47,16 +48,12 @@ const actionCreators = {

const actions = dispatch => bindActionCreators(actionCreators, dispatch);

const styles = StyleSheet.create({
listTitle: {
color: colors.black,
...fonts.fontPrimary,
},
listSubTitle: {
const DescriptionListItem = styled(ListItem).attrs({
subtitleStyle: {
color: colors.greyDark,
...fonts.fontPrimary,
},
});
})``;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this? Was probably just added by prettier for some reason, but I think you can safely get rid of it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's needed by styled components when using attrs()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh alright, yes you're right.


class OrganizationProfile extends Component {
props: {
Expand Down Expand Up @@ -172,9 +169,8 @@ class OrganizationProfile extends Component {
<SectionList
title={translate('organization.main.descriptionTitle', locale)}
>
<ListItem
<DescriptionListItem
subtitle={emojifyText(organization.description)}
subtitleStyle={styles.listSubTitle}
hideChevron
/>
</SectionList>
Expand Down