mirror of
https://github.com/NotAShelf/nix-evaluator-stats.git
synced 2026-04-12 22:37:42 +00:00
ui: distinguish between missing fields and zero values in comparison view
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I3fca108a637507c34f7579d6d52236136a6a6964
This commit is contained in:
parent
2feb30dc49
commit
80e0c9dc3d
5 changed files with 129 additions and 38 deletions
|
|
@ -3,7 +3,7 @@ import { StatsData } from '../utils/types';
|
|||
import { BarChart2 } from 'lucide-solid';
|
||||
|
||||
interface FileUploadProps {
|
||||
onFileLoad: (data: StatsData) => void;
|
||||
onFileLoad: (data: StatsData, raw: Record<string, unknown>) => void;
|
||||
onTextLoad: (text: string) => void;
|
||||
showHelp: boolean;
|
||||
onToggleHelp: () => void;
|
||||
|
|
@ -22,7 +22,7 @@ export default function FileUpload(props: FileUploadProps) {
|
|||
try {
|
||||
const text = await file.text();
|
||||
const json = JSON.parse(text);
|
||||
props.onFileLoad(json);
|
||||
props.onFileLoad(json, json);
|
||||
} catch {
|
||||
setError('Invalid JSON file');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue