Skip to content

Commit bb8ff85

Browse files
committed
fix: eslint fixes
1 parent 1b027a9 commit bb8ff85

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,12 @@ class Browser extends DashboardView {
246246
}
247247

248248
async login(username, password) {
249-
if (!!Parse.User.current()) {
249+
if (Parse.User.current()) {
250250
Parse.User.logOut();
251251
}
252-
try {
253-
const currentUser = await Parse.User.logIn(username, password);
254-
this.setState({ currentUser: currentUser, useMasterKey: false }, () => this.refresh());
255-
} catch (error) {
256-
throw error;
257-
}
252+
253+
const currentUser = await Parse.User.logIn(username, password);
254+
this.setState({ currentUser: currentUser, useMasterKey: false }, () => this.refresh());
258255
}
259256

260257
async logout() {

src/dashboard/Data/Browser/BrowserToolbar.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ let BrowserToolbar = ({
272272
<Separator />
273273
<MenuItem text={currentUser ? 'Switch Parse.User' : 'Browse as Parse.User'} onClick={showLogin} active={!!currentUser} />
274274
{currentUser ? <MenuItem text={useMasterKey ? <span>Browsing with <b>Master Key</b></span> : <span>Browse with <s>Master Key</s></span>} onClick={toggleMasterKeyUsage} active={!!currentUser} greenActive={useMasterKey} /> : <noscript />}
275-
{currentUser ? <MenuItem text={<span>Logout (<b>{currentUser.get("username")}</b>)</span>} onClick={logout} active={!!currentUser} /> : <noscript />}
275+
{currentUser ? <MenuItem text={<span>Logout (<b>{currentUser.get('username')}</b>)</span>} onClick={logout} active={!!currentUser} /> : <noscript />}
276276
</BrowserMenu>
277277
) : (
278278
<noscript />

src/dashboard/Data/Browser/LoginDialog.react.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React from "react";
2-
import ParseApp from "lib/ParseApp";
3-
import PropTypes from "prop-types";
4-
import Modal from "components/Modal/Modal.react";
5-
import LoginRow from "components/LoginRow/LoginRow.react";
6-
import Notification from "dashboard/Data/Browser/Notification.react";
1+
import React from 'react';
2+
import ParseApp from 'lib/ParseApp';
3+
import PropTypes from 'prop-types';
4+
import Modal from 'components/Modal/Modal.react';
5+
import LoginRow from 'components/LoginRow/LoginRow.react';
6+
import Notification from 'dashboard/Data/Browser/Notification.react';
77

88
export default class LoginDialog extends React.Component {
99
constructor(props) {
1010
super(props);
1111
this.state = {
1212
open: false,
13-
username: "",
14-
password: ""
13+
username: '',
14+
password: ''
1515
};
1616

1717
this.handleOpen = this.handleOpen.bind(this);
@@ -61,12 +61,12 @@ export default class LoginDialog extends React.Component {
6161
open && (
6262
<Modal
6363
type={Modal.Types.INFO}
64-
title={currentUser ? "Switch Parse.User" : "Login as Parse.User"}
64+
title={currentUser ? 'Switch Parse.User' : 'Login as Parse.User'}
6565
subtitle={
66-
<div style={{ paddingTop: "5px" }}>
66+
<div style={{ paddingTop: '5px' }}>
6767
{currentUser && (
6868
<p>
69-
Logged in as <strong>{currentUser.get("username")}</strong>
69+
Logged in as <strong>{currentUser.get('username')}</strong>
7070
</p>
7171
)}
7272
</div>

0 commit comments

Comments
 (0)