Fix the TypeScript warnings

This commit is contained in:
M. Mert Yildiran 2021-08-21 10:08:16 +03:00
parent 494af0c8c7
commit 254068ec39
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A
4 changed files with 6 additions and 8 deletions

View File

@ -38,7 +38,7 @@ const App = () => {
} }
})(); })();
}, []); });
const onTLSDetected = (destAddress: string) => { const onTLSDetected = (destAddress: string) => {
addressesWithTLS.add(destAddress); addressesWithTLS.add(destAddress);

View File

@ -1,9 +1,8 @@
import React from "react"; import React from "react";
import {singleEntryToHAR} from "./utils"; import {singleEntryToHAR} from "./utils";
import styles from './style/HarEntryDetailed.module.sass';
import HAREntryViewer from "./HarEntryViewer/HAREntryViewer"; import HAREntryViewer from "./HarEntryViewer/HAREntryViewer";
import {makeStyles} from "@material-ui/core"; import {makeStyles} from "@material-ui/core";
import Protocol, {ProtocolInterface} from "./Protocol" import Protocol from "./Protocol"
import StatusCode from "./StatusCode"; import StatusCode from "./StatusCode";
import {EndpointPath} from "./EndpointPath"; import {EndpointPath} from "./EndpointPath";

View File

@ -5,7 +5,6 @@ import CollapsibleContainer from "../CollapsibleContainer";
import FancyTextDisplay from "../FancyTextDisplay"; import FancyTextDisplay from "../FancyTextDisplay";
import Checkbox from "../Checkbox"; import Checkbox from "../Checkbox";
import ProtobufDecoder from "protobuf-decoder"; import ProtobufDecoder from "protobuf-decoder";
var jp = require('jsonpath');
interface HAREntryViewLineProps { interface HAREntryViewLineProps {
label: string; label: string;
@ -202,7 +201,7 @@ export const HAREntryPolicySectionContainer: React.FC<HAREntryPolicySectionConta
} }
export const HAREntryTablePolicySection: React.FC<HAREntryPolicySectionProps> = ({service, title, color, response, latency, arrayToIterate}) => { export const HAREntryTablePolicySection: React.FC<HAREntryPolicySectionProps> = ({service, title, color, response, latency, arrayToIterate}) => {
const base64ToJson = response.content.mimeType === "application/json; charset=utf-8" ? JSON.parse(Buffer.from(response.content.text, "base64").toString()) : {}; // const base64ToJson = response.content.mimeType === "application/json; charset=utf-8" ? JSON.parse(Buffer.from(response.content.text, "base64").toString()) : {};
return <React.Fragment> return <React.Fragment>
{ {
arrayToIterate && arrayToIterate.length > 0 ? arrayToIterate && arrayToIterate.length > 0 ?

View File

@ -6,7 +6,7 @@ import {HAREntryTableSection, HAREntryBodySection, HAREntryTablePolicySection} f
const SectionsRepresentation: React.FC<any> = ({data, color}) => { const SectionsRepresentation: React.FC<any> = ({data, color}) => {
const sections = [] const sections = []
for (const [i, row] of data.entries()) { data.forEach((row) => {
switch (row.type) { switch (row.type) {
case "table": case "table":
sections.push( sections.push(
@ -21,7 +21,7 @@ const SectionsRepresentation: React.FC<any> = ({data, color}) => {
default: default:
break; break;
} }
} });
return <>{sections}</>; return <>{sections}</>;
} }