Skip to content

Commit c9b2d56

Browse files
Miriadbuilder
andcommitted
chore: address review feedback — delete dead Cloudinary components, add LQIP TODO, document video URL format
- Delete unused cloudinary-image.tsx and cloudinary-video.tsx - Add TODO comment for LQIP blur placeholder support in cover-image.tsx - Add explanatory comment for Sanity file ref URL construction in cover-video.tsx Co-authored-by: builder <builder@miriad.systems>
1 parent 0dc796a commit c9b2d56

File tree

4 files changed

+6
-40
lines changed

4 files changed

+6
-40
lines changed

components/cloudinary-image.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

components/cloudinary-video.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

components/cover-image.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export default function CoverImage(props: CoverImageProps) {
1717
? urlForImage(image)?.width(width || 1920).height(height || 1080).quality(quality || 80).url()
1818
: null;
1919

20+
// TODO: Add LQIP blur placeholder for progressive loading. Options:
21+
// 1. Query Sanity for lqip metadata: image.asset->metadata.lqip
22+
// 2. Use a tiny base64 placeholder generated at build time
23+
2024
if (!imageUrl) {
2125
return (
2226
<div className="transition-shadow duration-200 shadow-md group-hover:shadow-lg sm:mx-0">

components/cover-video.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export default function CoverVideo(props: CoverVideoProps) {
1818
);
1919
}
2020

21-
// Convert file-{hash}-{ext} to URL
22-
// file-abc123-mp4 -> https://cdn.sanity.io/files/{projectId}/{dataset}/abc123.mp4
21+
// Sanity file asset references follow the format: file-{id}-{extension}
22+
// e.g., "file-abc123def456-mp4" → https://cdn.sanity.io/files/{projectId}/{dataset}/abc123def456.mp4
2323
const parts = assetRef.split('-');
2424
const ext = parts.pop();
2525
const hash = parts.slice(1).join('-');

0 commit comments

Comments
 (0)