Skip to content

Commit

Permalink
Fix eslint warnings
Browse files Browse the repository at this point in the history
We keep getting comments on pull requests about these, so I figured I
should fix them finally.
  • Loading branch information
kdeal authored and Kyle Deal committed Oct 28, 2024
1 parent b6d51fc commit 5d25763
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/components/UserPreferenceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ class UserPreferenceForm extends Component {
handleSubmit(prefId, event) {
event.preventDefault();
if (this.state) {
const { email } = this.props;
const { [prefId]: preferenceData } = this.state;
axios
.post(`/v1/user/preferences/subscription/${prefId}`, {
...this.state[prefId],
email: this.props.email,
...preferenceData,
email,
})
.then(() => {
alert("Preference Updated"); // eslint-disable-line
Expand Down Expand Up @@ -166,7 +168,8 @@ class UserPreferenceForm extends Component {
}

render() {
if (this.props.loading) {
const { loading } = this.props;
if (loading) {
return (
<div className="spinner-border preferences-spinner" role="status">
<span className="sr-only">Loading...</span>
Expand Down
1 change: 1 addition & 0 deletions frontend/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ apiRoutes(app);

const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
// eslint-disable-next-line no-console
console.log(`Server listening on port ${PORT}...`);
});

0 comments on commit 5d25763

Please sign in to comment.