Commit 7b92c526 authored by Sakthivel G's avatar Sakthivel G
Browse files

refactor: resolve console warnings

Showing with 60 additions and 58 deletions
+60 -58
import { title } from "process";
import { Fragment, useEffect, useState } from "react";
import { Fragment } from "react";
import { Link } from "react-router-dom";
export interface ITitle {
title: string,
url: string,
icon?: string
title: string;
url: string;
icon?: string;
}
interface BreadcrumbsProps {
data: ITitle[]
historyData: any,
data: ITitle[];
historyData: any;
}
export const Breadcrumbs = ({ data, historyData }: BreadcrumbsProps) => {
return (
<Fragment>
<div className="d-flex align-items-center h100">
{ data && data.length &&
data.map((title, index) => {
return (
<div className="d-flex custom breadcrumb" key={index}>
{ index !==0 &&
<i className="fa fa-chevron-right arrow"></i>
}
{
title.title && (!title.url || title.url === 'none') &&
<span className="d-flex ml-2 m-auto">
{/* <i className="fa fa-chevron-right arrow"></i> */}
<span className="title">{title.title}</span>
</span>
}
{
title.url && title.url !== 'none' &&
<Link to={title.url} className="title active">
{/* <i className="fa fa-chevron-right arrow"></i> */}
{title.title}
</Link>
// <Link to={title.url} className={`${historyData.location.pathname.match(title.url)
// ? "title active"
// : "title"
// }`}>{title.title}</Link>
}
</div>
)
})
return (
<Fragment>
<div className="d-flex align-items-center h100">
{data &&
data.length &&
data.map((title, index) => {
return (
<div className="d-flex custom breadcrumb" key={index}>
{index !== 0 && <i className="fa fa-chevron-right arrow"></i>}
{title.title && (!title.url || title.url === "none") && (
<span className="d-flex ml-2 m-auto">
{/* <i className="fa fa-chevron-right arrow"></i> */}
<span className="title">{title.title}</span>
</span>
)}
{
title.url && title.url !== "none" && (
<Link to={title.url} className="title active">
{/* <i className="fa fa-chevron-right arrow"></i> */}
{title.title}
</Link>
)
// <Link to={title.url} className={`${historyData.location.pathname.match(title.url)
// ? "title active"
// : "title"
// }`}>{title.title}</Link>
}
</div>
</Fragment >
);
}
\ No newline at end of file
</div>
);
})}
</div>
</Fragment>
);
};
import React, { Component, Fragment } from "react";
/* eslint-disable no-mixed-operators */
import { Component, Fragment } from "react";
import Auth from "../../helpers/auth";
import { Link } from "react-router-dom";
import { UserService } from "../../services/user.service";
......@@ -51,7 +52,7 @@ class Header extends Component<LoginProps, LoginState> {
className="row"
>
<div className="col-6 pt-3">
<img src="./../../img/smf-header-logo.svg" className="img-fluid" alt="Responsive image" />
<img src="./../../img/smf-header-logo.svg" className="img-fluid" alt="SMF logo" />
</div>
<div className="col-6 pt-3">
<div className="dropdown">
......
import React, { Component, Fragment } from "react";
import { Link } from "react-router-dom";
import { Component, Fragment } from "react";
// import BrandNavBar from "../../dashboard/components/common/BrandNavBar";
// import HeaderNavBar from "../../dashboard/components/common/HeaderNavBar";
// import Sidebar from "../common/Sidebar";
......
import React, { Component, Fragment } from "react";
import PropTypes from "prop-types";
import { Component, Fragment } from "react";
import { Link } from "react-router-dom";
import { FormService } from "../../services/form.service";
import { APP, LANG } from "../../constants";
import Notify from "../../helpers/notify";
import Header from "./../common/Header";
import { BtnTwo } from "../buttons";
class ListForms extends Component {
......
import React, { Component, Fragment } from "react";
import { Component, Fragment } from "react";
import PropTypes from "prop-types";
import { Link } from "react-router-dom";
import { FormService } from "../../services/form.service";
import { APP } from "../../constants";
import Notify from "../../helpers/notify";
......
import React, { Component } from "react";
import { Link } from "react-router-dom";
/* eslint-disable no-multi-str */
import { Component } from "react";
// import LocalizedStrings from "react-localization";
// import { translations } from "./../../../../translations.js";
import { LANG, APP } from "./../../../constants/index";
......
import React, { Component } from "react";
import { Component } from "react";
import { UserService } from "../../services/user.service";
import Auth from "../../helpers/auth";
import Notify from "../../helpers/notify";
......
import { BtnOne } from "../buttons";
import styles from "./ModalOne.module.css";
/* eslint-disable @typescript-eslint/no-unused-vars */
import btnStyle from "../buttons/BtnOne.module.css";
import { LANG } from "../../constants";
......
import { useEffect } from "react";
import { LANG } from "../../constants";
import styles from "./StatusBar.module.css";
......
import { useEffect } from "react"
import "./TabOne.css"
/**
......
/*eslint-disable no-empty-pattern*/
import { useEffect, useState } from "react";
import { useRecoilState } from "recoil";
import {
......@@ -24,6 +25,7 @@ export const AllApplicationsTab = ({}: AllApplicationsTabProps) => {
if (selectedTabData && selectedTabData[0]) {
setData(selectedTabData[0]);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectTab]);
return (
......
import { Fragment, useEffect } from "react";
import { Fragment } from "react";
import Header from "../../components/common/Header";
import { useHistory } from 'react-router-dom';
import { InspectionSummaryLayout } from "../../layouts";
......
......@@ -85,12 +85,14 @@ export const RegulatorAllApplications = ({
if(selectedTab.length) {
setSelectedTab("New")
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
if (currentData.length && selectedTab === "") {
setSelectedTab("New");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentData]);
const getSelectedTabData = () => {
......
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable no-mixed-operators */
import { Fragment, useEffect, useState } from "react";
import { useHistory } from "react-router";
import { BtnOne, BtnTwo } from "../../components/buttons"
......@@ -98,6 +100,7 @@ export const CreateUser = ({ data }: userProps) => {
])
setIsEditMode(false)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
useEffect(() => {
......@@ -106,6 +109,7 @@ export const CreateUser = ({ data }: userProps) => {
} else {
handlesRoles(false)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isEditMode])
const handlesRoles = (isEdit: boolean) => {
......@@ -122,6 +126,7 @@ export const CreateUser = ({ data }: userProps) => {
return { ...r, isChecked: false }
}
})
return null;
})
setRoles(rolesUpdated)
} else {
......@@ -199,6 +204,7 @@ export const CreateUser = ({ data }: userProps) => {
} else {
k.isChecked = false
}
return null;
});
// tempRoles[i].isChecked = !tempRoles[i].isChecked
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment