Skip to content

Commit

Permalink
fix: eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramk committed Aug 7, 2023
1 parent fef3956 commit 6af3eae
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions nerdlets/shared/components/NerdGraphError/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';

import { Icon, Button } from 'nr1';
import { Icon } from 'nr1';

import styles from './styles.scss';

const _defaultDetails = function({ error }) {
const _defaultDetails = function ({ error }) {
// eslint-disable-next-line no-unused-vars
const { graphQLErrors, message, stack } = error;
return (
Expand All @@ -30,32 +30,32 @@ const _defaultDetails = function({ error }) {
);
};
_defaultDetails.propTypes = {
error: PropTypes.object
error: PropTypes.object,
};

export class NerdGraphError extends React.Component {
static propTypes = {
error: PropTypes.object,
showDetails: PropTypes.bool,
errorDetails: PropTypes.func
errorDetails: PropTypes.func,
};

static defaultProps = {
showDetails: true,
errorDetails: _defaultDetails
errorDetails: _defaultDetails,
};

constructor(props) {
super(props);
this.state = {
expanded: false
expanded: false,
};
this.onClick = this.onClick.bind(this);
}

onClick() {
this.setState(prevState => ({
expanded: !prevState.expanded
this.setState((prevState) => ({
expanded: !prevState.expanded,
}));
}

Expand Down Expand Up @@ -88,4 +88,4 @@ export class NerdGraphError extends React.Component {
</div>
);
}
}
}

0 comments on commit 6af3eae

Please sign in to comment.