Skip to content

Commit 17fc133

Browse files
Merge pull request #74 from IntersectMBO/test/add-blueprint-tests
test/add blueprint tests
2 parents ae7cdb5 + 44b698b commit 17fc133

File tree

4 files changed

+1180
-1
lines changed

4 files changed

+1180
-1
lines changed

docs/app/tools/blueprint-codegen/blueprint-codegen.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ export function BlueprintCodegen() {
7373
}
7474
}
7575

76+
const loadSample = async () => {
77+
try {
78+
const response = await fetch('/sample-blueprint.json')
79+
if (!response.ok) {
80+
throw new Error('Failed to load sample blueprint')
81+
}
82+
const sampleJson = await response.json()
83+
setBlueprintJson(JSON.stringify(sampleJson, null, 2))
84+
setError(null)
85+
} catch (err) {
86+
console.error('Failed to load sample:', err)
87+
setError(err instanceof Error ? err.message : 'Failed to load sample blueprint')
88+
}
89+
}
90+
7691
return (
7792
<div className="max-w-6xl mx-auto space-y-6">
7893
<div className="rounded-lg border bg-card text-card-foreground shadow-sm">
@@ -82,6 +97,12 @@ export function BlueprintCodegen() {
8297
<h3 className="text-2xl font-semibold tracking-tight">Blueprint Input</h3>
8398
<p className="text-sm text-muted-foreground">Paste your plutus.json blueprint</p>
8499
</div>
100+
<button
101+
onClick={loadSample}
102+
className="inline-flex items-center justify-center rounded-md text-sm font-medium h-9 px-6 py-2 bg-zinc-700 text-white hover:bg-zinc-600 active:bg-zinc-500 transition-all cursor-pointer shadow-sm hover:shadow"
103+
>
104+
Load Sample
105+
</button>
85106
</div>
86107

87108
<div className="space-y-4">

docs/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/types/routes.d.ts";
3+
import "./out/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)