Skip to content

Commit 2a497a8

Browse files
committed
refactor(component): remove unused method
1 parent 6fdd791 commit 2a497a8

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/react-toggle-pattern.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
// LICENSE : MIT
22
"use strict";
3-
import React, {Component, PropTypes} from 'react';
3+
import React from 'react';
44

5-
export default class TogglePattern extends Component {
5+
export default class TogglePattern extends React.Component {
66
getFlagNames() {
77
return Object.keys(this.props);
88
}
99

10-
getUnMatchedComponent() {
11-
const children = [].concat(this.props.children);
12-
const flagKeyNames = this.getFlagNames();
13-
return children.filter(child => {
14-
const childKeys = Object.keys(child.props);
15-
return childKeys.some(childKey => {
16-
return flagKeyNames.indexOf(childKey) == -1;
17-
});
18-
});
19-
};
20-
2110
getMatchedComponent() {
2211
const children = [].concat(this.props.children);
2312
const flagKeyNames = this.getFlagNames();

0 commit comments

Comments
 (0)