Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: product site link on showcase pages
kapishdima26893246df26
diff --git a/app/(home)/showcases/components/showcase-details.tsx b/app/(home)/showcases/components/showcase-details.tsxindex f96dd014..32378dcf 100644--- a/app/(home)/showcases/components/showcase-details.tsx+++ b/app/(home)/showcases/components/showcase-details.tsx@@ -54,20 +54,39 @@ export function ShowcaseDetails({ clip }: { clip: ReelClip }) {</div>)}- {clip.githubUrl && (- <a- href={clip.githubUrl}- target="_blank"- rel="noreferrer"- className={cn(- landingButtonVariants({ variant: "ink" }),- pageHeaderButton,- "self-start",+ {(clip.githubUrl || clip.productUrl) && (+ <div className="flex flex-wrap gap-2">+ {clip.githubUrl && (+ <a+ href={clip.githubUrl}+ target="_blank"+ rel="noreferrer"+ className={cn(+ landingButtonVariants({ variant: "ink" }),+ pageHeaderButton,+ )}+ >+ <GitHubLogoIcon className="size-4" />+ View source+ </a>)}- >- <GitHubLogoIcon className="size-4" />- View source- </a>+ {clip.productUrl && (+ <a+ href={clip.productUrl}+ target="_blank"+ rel="noreferrer"+ className={cn(+ landingButtonVariants({ variant: "secondary" }),+ pageHeaderButton,+ )}+ >+ {new URL(clip.productUrl).hostname.replace(/^www\./, "")}+ <span aria-hidden="true" className="text-primary">+ ↗+ </span>+ </a>+ )}+ </div>)}</aside>);diff --git a/app/(home)/showcases/lib/reel-types.ts b/app/(home)/showcases/lib/reel-types.tsindex 594deedb..4f9cb724 100644--- a/app/(home)/showcases/lib/reel-types.ts+++ b/app/(home)/showcases/lib/reel-types.ts@@ -18,6 +18,8 @@ export type ReelClip = {iso: string;dateLabel: string;githubUrl: string | null;+ /** Site of the product the video is about. */+ productUrl: string | null;components: ReelComponent[];/** Seconds from the start of the reel. */start: number;diff --git a/app/(home)/showcases/lib/reel.ts b/app/(home)/showcases/lib/reel.tsindex b4658533..96f4d30e 100644--- a/app/(home)/showcases/lib/reel.ts+++ b/app/(home)/showcases/lib/reel.ts@@ -13,6 +13,11 @@ const TRACK_LIMIT = 8;/** Used for a clip whose file can't be measured, so the reel stays whole. */const FALLBACK_DURATION = 30;+/** Product sites by showcase slug. The manager has no field for them. */+const PRODUCT_URLS: Record<string, string> = {+ "introducing-videorc": "https://www.videorc.com/",+};+const REGISTRY_NAMES = new Set([remocnRegistry, remocnUiRegistry, remocnIconsRegistry].flatMap((registry) =>registry.items.map((item) => item.name),@@ -77,6 +82,7 @@ export const getReel = cache(async (): Promise<Reel> => {iso: createdAt.toISOString().slice(0, 10),dateLabel: showcaseDateFormatter.format(createdAt),githubUrl: showcase.githubUrl ?? null,+ productUrl: PRODUCT_URLS[showcase.slug] ?? null,components: showcase.components.map((c) => toComponent(c, docs)),start,duration,