Bug 1576652 - Remove unused state in Debugger's Accordion component; r=jlast

Differential Revision: https://phabricator.services.mozilla.com/D43492

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Florens Verschelde 2019-08-26 21:53:00 +00:00
Родитель 3b375c8b7b
Коммит 8269474069
1 изменённых файлов: 1 добавлений и 14 удалений

Просмотреть файл

@ -21,20 +21,7 @@ type AccordionItem = {
type Props = { items: Array<Object> }; type Props = { items: Array<Object> };
type State = { class Accordion extends Component<Props> {
opened: boolean[],
created: boolean[],
};
class Accordion extends Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = {
opened: props.items.map(item => item.opened),
created: [],
};
}
handleHeaderClick(i: number) { handleHeaderClick(i: number) {
const item = this.props.items[i]; const item = this.props.items[i];
const opened = !item.opened; const opened = !item.opened;