Skip to content

Commit 3a71063

Browse files
authored
Merge pull request #4080 from ClickHouse/remove_logging
remove logging
2 parents 8178b9c + 6dfe752 commit 3a71063

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

src/theme/IdealImage/index.tsx

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,8 @@ export default function IdealImage(
112112

113113
// In dev env just use regular img with original file
114114
if (typeof img === "string" || (typeof img === "object" && img !== null && "default" in img)) {
115-
console.log('=== Early Return Debug ===');
116-
console.log('Image type:', typeof img);
117-
console.log('Has default property:', typeof img === "object" && img !== null && "default" in img);
118-
console.log('Image value:', img);
119115
const isGifInEarlyReturn = typeof img === "string" ? img.endsWith('.gif') :
120116
(typeof img === "object" && img !== null && typeof img.default === "string" && img.default.endsWith('.gif'));
121-
console.log('Is this a GIF?', isGifInEarlyReturn);
122117

123118
const gifStyles = isGifInEarlyReturn ? (
124119
size === "lg"
@@ -149,10 +144,6 @@ export default function IdealImage(
149144
}
150145
) : {};
151146

152-
console.log('GIF styles being applied:', gifStyles);
153-
console.log('Size parameter:', size);
154-
console.log('Max width should be:', MAX_SIZE_FILTERS[size]);
155-
156147
return (
157148
<div style={{
158149
position: "relative",
@@ -208,26 +199,8 @@ export default function IdealImage(
208199
// Check if current image is a GIF
209200
const isCurrentGif = currentImage.path?.toLowerCase().endsWith('.gif') || false;
210201

211-
// Check if current image is a GIF
212-
console.log('Current image object:', currentImage);
213-
console.log('Current image path:', currentImage.path);
214-
console.log('All images in set:', img.src.images);
215-
216202
const isGif = currentImage.path?.toLowerCase().endsWith('.gif') || false;
217203

218-
console.log('Is GIF detected:', isGif);
219-
220-
// Debug logging
221-
if (isGif) {
222-
console.log('GIF detected:', {
223-
path: currentImage.path,
224-
size: size,
225-
maxWidth: MAX_SIZE_FILTERS[size],
226-
currentImageWidth: currentImage.width,
227-
currentImageHeight: currentImage.height
228-
});
229-
}
230-
231204
// Apply conditional styles based on the `size`
232205
const imageStyles: React.CSSProperties =
233206
size === "lg"
@@ -260,18 +233,6 @@ export default function IdealImage(
260233
}),
261234
};
262235

263-
// Debug logging after styles are created
264-
console.log('=== IdealImage Debug ===');
265-
console.log('Current image path:', currentImage.path);
266-
console.log('Is GIF detected:', isCurrentGif);
267-
console.log('Size parameter:', size);
268-
console.log('Max width for size:', MAX_SIZE_FILTERS[size]);
269-
console.log('Current image dimensions:', {
270-
width: currentImage.width,
271-
height: currentImage.height
272-
});
273-
console.log('Image styles being applied:', imageStyles);
274-
275236
const containerStyles: React.CSSProperties = {
276237
position: "relative",
277238
...(background
@@ -321,7 +282,6 @@ export default function IdealImage(
321282
}, 1000); // 1 second timeout
322283

323284
const testSpeed = async () => {
324-
console.log("Downloading...");
325285
const url = currentImage.path!;
326286
const startTime = performance.now();
327287

@@ -388,4 +348,4 @@ export default function IdealImage(
388348
</div>
389349
</div>
390350
);
391-
}
351+
}

0 commit comments

Comments
 (0)