import React from "react"; import ReactDOM from "react-dom"; import { getMemory } from "../memory"; import { Classifications } from "../stolen-data-entry"; import { reduceConcat, useEmitter } from "../util"; import EmailTemplate from "./email-template"; import HARConverter from "./har-converter"; function Report() { const origin = new URL(document.location.toString()).searchParams.get( "origin" ); const [counter, setCounter] = useEmitter(getMemory()); function refresh() { setCounter((c) => c + 1); } const clusters = getMemory().getClustersForOrigin(origin); const entries = Object.values(clusters) .map((cluster) => cluster.getRepresentativeStolenData()) .reduce(reduceConcat, []) .filter((entry) => entry.isMarked); return (

Generuj treść maila dla {origin}

{entries.map((entry) => ( ))}
Adres docelowy Źródło danych Treść danych Klasyfikacja
{entry.request.shorthost} {entry.source}:{entry.name} {entry.getValuePreview()} {/* always gonna have one key, because unwrapEntry is called above */}
); } ReactDOM.render(, document.getElementById("app"));