Skip to content

Commit

Permalink
link to external_url from recipe metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwaits committed Jan 23, 2025
1 parent 2177c40 commit 02f90ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions app/cookbook/components/snippet-result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,7 @@ export function SnippetResult({
</Button> */}
{type === "clarity" && (
<Button variant="link" className="gap-2 self-end" size="sm" asChild>
<Link
href={`https://play.hiro.so/?epoch=3.0&snippet=KGRlZmluZS1yZWFkLW9ubHkgKGdldC10ZW51cmUtaGVpZ2h0IChibG9jayB1aW50KSkKICAob2sKICAgIChhdC1ibG9jawogICAgICAodW53cmFwIQogICAgICAgIChnZXQtc3RhY2tzLWJsb2NrLWluZm8_IGlkLWhlYWRlci1oYXNoIGJsb2NrKQogICAgICAgIChlcnIgdTQwNCkogICAgICApCiAgICAgIHRlbnVyZS1oZWlnaHQKICAgICkKICApCik=`}
target="_blank"
>
<Link href={recipe?.external_url || ""} target="_blank">
Open in Clarity Playground <ArrowUpRight className="w-4 h-4" />
</Link>
</Button>
Expand Down
1 change: 1 addition & 0 deletions types/recipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface RecipeMetadata {
categories: RecipeCategory[];
tags: SubTagsForCategory[RecipeCategory][];
dependencies?: Record<string, string>;
external_url?: string;
}

// Code blocks extracted from markdown content
Expand Down

0 comments on commit 02f90ad

Please sign in to comment.