mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 01:38:12 +08:00
remove all linting errors on client/src (#1463)
* run eslint --fix * camelcase * camelCase config part 1 * part 2 * part 3 - removing subscripts * fix "class-methods-use-this" * fix "class-methods-use-this" * fix eslint ignores * add eslint ignore for set state in update * reformat comments to appease eslint * add a11y features * sort-comp fix * a11y fix * add ignore for set state in update * add a11y htmlFor * remove unused toast * remove unnecessary bind * add ignore for set state in update * add rel="noopener noreferrer" Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener * use arrow function to bind * remove unused definitions/declarations * prettier * remove unused state * add comments to empty catch blocks remove curly brackets * escape ' * use eqeqeq * switch from default export * remove ignore log * remove static * fix import * revert subscripting config * clean-up * remove unnecessary subscript * fix new errors from master * change category click handler to a class property * fix camelcase changes that slipped by * unused import * Fix newly introduced ESLint errors from addGenes
This commit is contained in:
@@ -8,8 +8,6 @@ import {
|
||||
Colors,
|
||||
Icon,
|
||||
} from "@blueprintjs/core";
|
||||
import * as globals from "../../globals";
|
||||
import { termsOfServiceToast } from "../framework/toasters";
|
||||
|
||||
const CookieDecision = "cxg.cookieDecision";
|
||||
|
||||
@@ -26,12 +24,14 @@ function storageGet(key, defaultValue = null) {
|
||||
function storageSet(key, value) {
|
||||
try {
|
||||
window.localStorage.setItem(key, value);
|
||||
} catch {}
|
||||
} catch {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
@connect((state) => ({
|
||||
tosURL: state.config?.parameters?.about_legal_tos,
|
||||
privacyURL: state.config?.parameters?.about_legal_privacy,
|
||||
tosURL: state.config?.parameters?.["about_legal_tos"],
|
||||
privacyURL: state.config?.parameters?.["about_legal_privacy"],
|
||||
}))
|
||||
class TermsPrompt extends React.PureComponent {
|
||||
constructor(props) {
|
||||
@@ -59,7 +59,9 @@ class TermsPrompt extends React.PureComponent {
|
||||
if (window.cookieDecisionCallback instanceof Function) {
|
||||
try {
|
||||
window.cookieDecisionCallback();
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -82,6 +84,7 @@ class TermsPrompt extends React.PureComponent {
|
||||
}}
|
||||
href={tosURL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
terms of service
|
||||
</a>
|
||||
@@ -103,6 +106,7 @@ class TermsPrompt extends React.PureComponent {
|
||||
}}
|
||||
href={privacyURL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
privacy policy
|
||||
</a>
|
||||
@@ -118,12 +122,10 @@ class TermsPrompt extends React.PureComponent {
|
||||
<Drawer
|
||||
onclose={this.drawerClose}
|
||||
isOpen={isOpen}
|
||||
size={"120px"}
|
||||
size="120px"
|
||||
position={Position.BOTTOM}
|
||||
canOutsideClickClose={false}
|
||||
hasBackdrop={
|
||||
true /* if the user can't use the app or click outside to dismiss, that should be visually represented with a backdrop */
|
||||
}
|
||||
hasBackdrop /* if the user can't use the app or click outside to dismiss, that should be visually represented with a backdrop */
|
||||
enforceFocus={false}
|
||||
autoFocus={false}
|
||||
portal={false}
|
||||
@@ -149,12 +151,9 @@ class TermsPrompt extends React.PureComponent {
|
||||
onClick={this.handleOK}
|
||||
data-testid="tos-cookies-accept"
|
||||
>
|
||||
I'm OK with cookies!
|
||||
I'm OK with cookies!
|
||||
</Button>{" "}
|
||||
<Button
|
||||
onClick={this.handleNo}
|
||||
data-testid="tos-cookies-reject"
|
||||
>
|
||||
<Button onClick={this.handleNo} data-testid="tos-cookies-reject">
|
||||
No thanks
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user