Skip to content

Commit e461a22

Browse files
authored
Remove Warnings (#1200)
Signed-off-by: Daniel Valdivia <[email protected]>
1 parent 31fbdd5 commit e461a22

File tree

20 files changed

+33
-30
lines changed

20 files changed

+33
-30
lines changed

portal-ui/src/screens/Console/Account/DeleteServiceAccount.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const DeleteServiceAccount = ({
7979
]);
8080

8181
const removeRecord = () => {
82-
if (selectedServiceAccount == null) {
82+
if (selectedServiceAccount === null) {
8383
return;
8484
}
8585

portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,12 @@ const AccessRule = ({
197197
setLoadingAccessRules(false);
198198
}
199199
}
200-
}, [loadingAccessRules, setErrorSnackMessage, bucketName]);
200+
}, [
201+
loadingAccessRules,
202+
setErrorSnackMessage,
203+
displayAccessRules,
204+
bucketName,
205+
]);
201206

202207
const closeAddAccessRuleModal = () => {
203208
setAddAccessRuleOpen(false);

portal-ui/src/screens/Console/Buckets/BucketDetails/BrowserHandler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import React, { Fragment, useEffect, useState } from "react";
17+
import React, { Fragment, useEffect } from "react";
1818
import { connect } from "react-redux";
1919
import { Theme } from "@mui/material/styles";
2020
import createStyles from "@mui/styles/createStyles";

portal-ui/src/screens/Console/Buckets/BucketDetails/DeleteEvent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const DeleteEvent = ({
5252
if (deleteLoading) {
5353
return;
5454
}
55-
if (bucketEvent == null) {
55+
if (bucketEvent === null) {
5656
return;
5757
}
5858

portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ const ListObjects = ({
346346
if (
347347
loadingVersioning &&
348348
bucketInfo?.allowedActions &&
349-
bucketInfo?.name == bucketName
349+
bucketInfo?.name === bucketName
350350
) {
351351
if (displayListObjects) {
352352
api
@@ -423,7 +423,7 @@ const ListObjects = ({
423423
if (
424424
loading &&
425425
bucketInfo?.allowedActions &&
426-
bucketInfo?.name == bucketName
426+
bucketInfo?.name === bucketName
427427
) {
428428
if (displayListObjects) {
429429
let pathPrefix = "";

portal-ui/src/screens/Console/Common/BoxIconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const BoxIconButton = ({
7676
<IconButton
7777
{...rest}
7878
className={clsx(classes.root, {
79-
[classes.contained]: variant == "contained",
79+
[classes.contained]: variant === "contained",
8080
})}
8181
>
8282
{children}

portal-ui/src/screens/Console/Dashboard/BasicDashboard/BasicDashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const BasicDashboard = ({ classes, usage }: IDashboardProps) => {
8585
};
8686

8787
const makeServerArray = (usage: Usage | null) => {
88-
if (usage != null) {
88+
if (usage !== null) {
8989
return usage.servers.sort(function (a, b) {
9090
var nameA = a.endpoint.toLowerCase();
9191
var nameB = b.endpoint.toLowerCase();

portal-ui/src/screens/Console/Dashboard/BasicDashboard/ServerInfoCard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@ import { Card, CardHeader } from "@mui/material";
2424
import { CircleIcon, VersionIcon } from "../../../../icons";
2525
import get from "lodash/get";
2626
import { commonDashboardInfocard } from "../../Common/FormComponents/common/styleLibrary";
27+
2728
const styles = (theme: Theme) =>
2829
createStyles({
2930
...commonDashboardInfocard,
3031
});
32+
3133
interface ICardProps {
3234
classes: any;
3335
server: ServerInfo;
3436
index: number;
3537
}
38+
3639
const ServerInfoCard = ({ classes, server, index }: ICardProps) => {
3740
const serverStatusToClass = (health_status: string) => {
3841
switch (health_status) {
@@ -81,7 +84,7 @@ const ServerInfoCard = ({ classes, server, index }: ICardProps) => {
8184
className={`${classes.innerState} ${
8285
activeDisks <= totalDrives / 2 && classes.redState
8386
} ${
84-
totalDrives != 2 &&
87+
totalDrives !== 2 &&
8588
activeDisks === totalDrives / 2 + 1 &&
8689
classes.yellowState
8790
} ${activeDisks === totalDrives && classes.greenState}`}

portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const PieChartWidget = ({
178178
<Cell
179179
key={`cellOuter-${index}`}
180180
fill={
181-
typeof outerColors[index] == "undefined"
181+
typeof outerColors[index] === "undefined"
182182
? "#393939"
183183
: outerColors[index]
184184
}
@@ -219,7 +219,7 @@ const PieChartWidget = ({
219219
<Cell
220220
key={`cell-${index}`}
221221
fill={
222-
typeof innerColors[index] == "undefined"
222+
typeof innerColors[index] === "undefined"
223223
? "#393939"
224224
: innerColors[index]
225225
}

portal-ui/src/screens/Console/Groups/UsersSelectors.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import React, { useState, useEffect, useCallback } from "react";
17+
import React, { useCallback, useEffect, useState } from "react";
1818
import { connect } from "react-redux";
1919
import { Theme } from "@mui/material/styles";
2020
import createStyles from "@mui/styles/createStyles";
@@ -184,7 +184,7 @@ const UsersSelectors = ({
184184
<Grid item xs={12}>
185185
<Paper className={classes.paper}>
186186
{loading && <LinearProgress />}
187-
{records != null && records.length > 0 ? (
187+
{records !== null && records.length > 0 ? (
188188
<React.Fragment>
189189
<Grid item xs={12} className={classes.actionsTray}>
190190
<span className={classes.actionsTitle}>

0 commit comments

Comments
 (0)