Skip to content

Commit 02f90ad

Browse files
committed
link to external_url from recipe metadata
1 parent 2177c40 commit 02f90ad

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/cookbook/components/snippet-result.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,7 @@ export function SnippetResult({
232232
</Button> */}
233233
{type === "clarity" && (
234234
<Button variant="link" className="gap-2 self-end" size="sm" asChild>
235-
<Link
236-
href={`https://play.hiro.so/?epoch=3.0&snippet=KGRlZmluZS1yZWFkLW9ubHkgKGdldC10ZW51cmUtaGVpZ2h0IChibG9jayB1aW50KSkKICAob2sKICAgIChhdC1ibG9jawogICAgICAodW53cmFwIQogICAgICAgIChnZXQtc3RhY2tzLWJsb2NrLWluZm8_IGlkLWhlYWRlci1oYXNoIGJsb2NrKQogICAgICAgIChlcnIgdTQwNCkogICAgICApCiAgICAgIHRlbnVyZS1oZWlnaHQKICAgICkKICApCik=`}
237-
target="_blank"
238-
>
235+
<Link href={recipe?.external_url || ""} target="_blank">
239236
Open in Clarity Playground <ArrowUpRight className="w-4 h-4" />
240237
</Link>
241238
</Button>

types/recipes.ts

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface RecipeMetadata {
5151
categories: RecipeCategory[];
5252
tags: SubTagsForCategory[RecipeCategory][];
5353
dependencies?: Record<string, string>;
54+
external_url?: string;
5455
}
5556

5657
// Code blocks extracted from markdown content

0 commit comments

Comments
 (0)