From deb9e63c53ab41319af50266b8ecd5257717868f Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Wed, 14 Feb 2018 13:36:09 +0100 Subject: [PATCH 1/2] chore: remove unused component Closes #725 --- .../repository-section-title.component.js | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/components/repository-section-title.component.js diff --git a/src/components/repository-section-title.component.js b/src/components/repository-section-title.component.js deleted file mode 100644 index c5f533497..000000000 --- a/src/components/repository-section-title.component.js +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import { StyleSheet, Text, View } from 'react-native'; - -import { StateBadge } from 'components'; -import { colors, fonts } from 'config'; - -type Props = { - text: string, - openCount: number, - closedCount: number, - loading: boolean, -}; - -const styles = StyleSheet.create({ - title: { - flexDirection: 'row', - }, - titleText: { - color: colors.black, - ...fonts.fontPrimaryBold, - }, - badgeContainer: { - flexDirection: 'row', - marginTop: -7, - }, - badge: { - marginLeft: 10, - }, -}); - -export const RepositorySectionTitle = ({ - text, - loading, - openCount, - closedCount, -}: Props) => { - return ( - - {text} - {!loading && ( - - - - - )} - - ); -}; From 9c4a1674380be1fa3d374a986d665463e91864f3 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Wed, 14 Feb 2018 13:49:33 +0100 Subject: [PATCH 2/2] chore: remove test and export Oo' --- .../components/RepositorySectionTitle.js | 28 ------------------- src/components/index.js | 1 - 2 files changed, 29 deletions(-) delete mode 100644 __tests__/tests/components/RepositorySectionTitle.js diff --git a/__tests__/tests/components/RepositorySectionTitle.js b/__tests__/tests/components/RepositorySectionTitle.js deleted file mode 100644 index 09385ebdf..000000000 --- a/__tests__/tests/components/RepositorySectionTitle.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { shallow, render } from 'enzyme'; -import { RepositorySectionTitle, StateBadge } from 'components'; - -const defaultProps = { - text: 'test title', - openCount: 10, - closedCount: 10, - loading: false, -}; - -describe('', () => { - it('should display no StateBadge components if loading is true', () => { - const wrapper = shallow( - - ); - const badges = wrapper.find(StateBadge); - - expect(badges.length).toBe(0); - }); - - it('should display two StateBadge components if loading is false', () => { - const wrapper = shallow(); - const badges = wrapper.find(StateBadge); - - expect(badges.length).toBe(2); - }); -}); diff --git a/src/components/index.js b/src/components/index.js index ee9bb2b9c..41e553dbb 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -19,7 +19,6 @@ export * from './notification-list-item.component'; export * from './parallax-scroll.component'; export * from './repository-list-item.component'; export * from './repository-profile.component'; -export * from './repository-section-title.component'; export * from './search-bar.component'; // eslint-disable-line import/no-unresolved export * from './section-list.component'; export * from './state-badge.component';