diff --git a/src/lib/admin-api.ts b/src/lib/admin-api.ts
index 1c0749b..cee3daf 100644
--- a/src/lib/admin-api.ts
+++ b/src/lib/admin-api.ts
@@ -214,13 +214,18 @@ export async function fetchProject(slug: string): Promise
{
* studio copies. Returns [] when none / unreachable. */
export async function fetchTemplateVariants(
slug: string
-): Promise> {
+): Promise> {
const c = await safeGet<{
- projects?: Array<{ id?: string; aspect?: string; is_published?: boolean }>;
+ projects?: Array<{ id?: string; aspect?: string; is_published?: boolean; image?: string | null; full_demo?: string | null; demo?: string | null }>;
}>(`/v1/templates/${encodeURIComponent(slug)}`);
return (c?.projects ?? [])
.filter((p) => p?.id && p?.is_published && p?.aspect)
- .map((p) => ({ aspect: p.aspect as string, projectId: p.id as string }));
+ .map((p) => ({
+ aspect: p.aspect as string,
+ projectId: p.id as string,
+ image: p.image ?? undefined,
+ previewVideo: p.full_demo ?? p.demo ?? undefined,
+ }));
}
/** True when the gateway content endpoint is reachable. */
diff --git a/src/lib/video-templates-catalog.ts b/src/lib/video-templates-catalog.ts
index 0be0cf2..748fd8e 100644
--- a/src/lib/video-templates-catalog.ts
+++ b/src/lib/video-templates-catalog.ts
@@ -63,6 +63,10 @@ export type TemplateDetailAspectRatio = "16:9" | "1:1" | "9:16";
export interface TemplateVariant {
aspect: TemplateDetailAspectRatio;
projectId: string;
+ /** Per-aspect thumbnail + preview video so the detail page shows the render
+ * that actually matches the selected aspect (not the 16:9 cover cropped). */
+ image?: string;
+ previewVideo?: string;
}
export const TEMPLATE_STYLE_COUNT = 4;