1
0
forked from icd/rentgen
rentgen/components/sidebar/stolen-data.tsx
Jacek Wielemborek c5cc840aef refactor: remove unused refreshToken prop and restore console.log
Changes:
- Removed unused refreshToken prop from StolenDataCluster component
  (replaced by useEmitter hook for re-rendering)
- Restored console.log in stolen-data-entry.ts for debugging
  parse errors (useful for development)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 20:43:11 +02:00

56 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { getMemory } from '../../memory';
import { RequestCluster } from '../../request-cluster';
import StolenDataCluster from './stolen-data-cluster';
import './stolen-data.scss';
export function StolenData({
origin,
minValueLength,
eventCounts,
cookiesOnly,
cookiesOrOriginOnly,
detailsVisibility,
}: {
origin: string;
eventCounts: Record<string, number | undefined>;
minValueLength: number;
cookiesOnly: boolean;
cookiesOrOriginOnly: boolean;
detailsVisibility: boolean;
}) {
if (!origin) {
return (
<div className="stolen-data-container">
<span>Otwórz nową kartę z wybraną stroną internetową</span>
</div>
);
}
const clusters = Object.values(getMemory().getClustersForOrigin(origin))
.sort(RequestCluster.sortCompare)
.filter((cluster) => !cookiesOnly || cluster.hasCookies())
.filter(
(cluster) => !cookiesOrOriginOnly || cluster.hasCookies() || cluster.exposesOrigin()
);
return (
<div className="stolen-data-container">
<span>Domeny{detailsVisibility ? ' oraz przesłane informacje' : null}</span>
{clusters.map((cluster) => {
return (
<StolenDataCluster
origin={origin}
shorthost={cluster.id}
key={cluster.id + origin}
minValueLength={minValueLength}
cookiesOnly={cookiesOnly}
cookiesOrOriginOnly={cookiesOrOriginOnly}
detailsVisibility={detailsVisibility}
/>
);
})}
</div>
);
}