Fix example for import

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-01-08 17:18:43 +08:00
parent e87c4a16a8
commit d8bad3d7b4
3 changed files with 30 additions and 25 deletions

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,6 @@ export function CrateWarnings({crate_index}) {
// #!render_count
console.log("CrateWarnings renders: ", renderCount)
// TODO UI/colors
return (
<div className="crate-info">
{crate_warnings.map((rule, index) => (

View File

@ -6,7 +6,8 @@ import {Validation} from "./validate";
// #!render_count
import {useRenderCount} from "@uidotdev/usehooks";
const JSONExample = JSON.stringify([
const JSONExample = JSON.stringify({
"crates": [
{
"items": [
{
@ -14,11 +15,11 @@ const JSONExample = JSON.stringify([
"options": null
},
{
"pn": "2118",
"pn": "2128",
"options": null
},
{
"pn": "2118",
"pn": "2128",
"options": null
},
{
@ -27,8 +28,13 @@ const JSONExample = JSON.stringify([
}
],
"type": "rack"
},
{
"items": [],
"type": "no_crate"
}
]);
]
});
export function ImportJSON() {
// #!render_count