Skip to content

Commit 092e049

Browse files
committed
remove call to getSketchSize
1 parent 8a7bd6c commit 092e049

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/layouts/SketchLayout.astro

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,20 @@ setJumpToState(null);
3939
const moreSketches = await getRandomCurationSketches(4);
4040
const featuredImageURL = makeThumbnailUrl(sketchInfo.visualID);
4141
42-
let { width, height } = await getSketchSize(sketchInfo.visualID);
42+
// NOTE: Commenting out the call to getSketchSize to minimise calls to OP due to rate limiting
43+
// width and height should be moved to data fetched by either getCuratedSketches or getSketch to minimise calls.
44+
45+
// let { width, height } = await getSketchSize(sketchInfo.visualID);
46+
// let heightOverWidth = 1 / 1.5;
47+
// if (width && height) {
48+
// // Account for OP header bar
49+
// height += 50;
50+
// heightOverWidth = height / width;
51+
// }
52+
53+
let width = undefined;
54+
let height = undefined;
4355
let heightOverWidth = 1 / 1.5;
44-
if (width && height) {
45-
// Account for OP header bar
46-
height += 50;
47-
heightOverWidth = height / width;
48-
}
4956
5057
const iframeTitle = `OpenProcessing Sketch: ${title} by ${authorName}`;
5158
---

0 commit comments

Comments
 (0)