Skip to content

Commit 0a29cbc

Browse files
committed
feat: improve warning message when blueprint cannot be found
1 parent 5ddff23 commit 0a29cbc

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

app/hypercerts/new-transferable/page.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
import { getBlueprintById } from "@/blueprints/getBlueprints";
66
import { TransferRestrictions } from "@hypercerts-org/sdk";
77
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert";
8+
import { InfoSection } from "@/components/global/sections";
89

910
export default async function NewHypercertPage({
1011
searchParams,
@@ -18,7 +19,13 @@ export default async function NewHypercertPage({
1819
const fetchedBlueprint = await getBlueprintById(parsedId);
1920

2021
if (!fetchedBlueprint) {
21-
return <div>Blueprint not found</div>;
22+
return (
23+
<main className="flex flex-col p-8 md:px-16 pt-8 pb-24 space-y-4 flex-1 container max-w-screen-lg">
24+
<InfoSection>
25+
The blueprint you are trying to use does not exist.
26+
</InfoSection>
27+
</main>
28+
);
2229
}
2330

2431
formValues = fetchedBlueprint.form_values as HypercertFormValues;

app/hypercerts/new/page.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
HypercertMintingForm,
44
} from "@/components/hypercert/hypercert-minting-form";
55
import { getBlueprintById } from "@/blueprints/getBlueprints";
6+
import { InfoSection } from "@/components/global/sections";
67

78
export default async function NewHypercertPage({
89
searchParams,
@@ -18,7 +19,13 @@ export default async function NewHypercertPage({
1819
const fetchedBlueprint = await getBlueprintById(parsedId);
1920

2021
if (!fetchedBlueprint) {
21-
return <div>Blueprint not found</div>;
22+
return (
23+
<main className="flex flex-col p-8 md:px-16 pt-8 pb-24 space-y-4 flex-1 container max-w-screen-lg">
24+
<InfoSection>
25+
The blueprint you are trying to use does not exist.
26+
</InfoSection>
27+
</main>
28+
);
2229
}
2330

2431
formValues = {

0 commit comments

Comments
 (0)