From b04f8ca3442df266d1f147441b3d344aa6b43705 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 26 Jan 2026 10:11:32 -0800 Subject: [PATCH] refactor(docs): simplify asset resolution by using correct paths directly Remove path normalization logic from action-media component. Instead, use the appropriate paths in MDX: - PNGs: /static/quick-reference/... (local) - MP4s: quick-reference/... (blob via getAssetUrl) --- apps/docs/components/ui/action-media.tsx | 17 +-------- .../content/docs/en/quick-reference/index.mdx | 38 +++++++++---------- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/apps/docs/components/ui/action-media.tsx b/apps/docs/components/ui/action-media.tsx index 1c018757d..1f187fb90 100644 --- a/apps/docs/components/ui/action-media.tsx +++ b/apps/docs/components/ui/action-media.tsx @@ -12,23 +12,10 @@ interface ActionVideoProps { alt: string } -/** - * Normalize path for blob storage - * - Strips leading slash - * - Strips 'static/' prefix - */ -function normalizeBlobPath(src: string): string { - let path = src.startsWith('/') ? src.slice(1) : src - path = path.replace(/^static\//, '') - return path -} - export function ActionImage({ src, alt }: ActionImageProps) { - const resolvedSrc = src.startsWith('/') ? src : `/${src}` - return ( {alt} @@ -36,7 +23,7 @@ export function ActionImage({ src, alt }: ActionImageProps) { } export function ActionVideo({ src, alt }: ActionVideoProps) { - const resolvedSrc = getAssetUrl(normalizeBlobPath(src)) + const resolvedSrc = getAssetUrl(src) return (