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) => {
addressesWithTLS.add(destAddress);

View File

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

View File

@ -5,7 +5,6 @@ import CollapsibleContainer from "../CollapsibleContainer";
import FancyTextDisplay from "../FancyTextDisplay";
import Checkbox from "../Checkbox";
import ProtobufDecoder from "protobuf-decoder";
var jp = require('jsonpath');
interface HAREntryViewLineProps {
label: string;
@ -202,7 +201,7 @@ export const HAREntryPolicySectionContainer: React.FC<HAREntryPolicySectionConta
}
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>
{
arrayToIterate && arrayToIterate.length > 0 ?

View File

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