Skip to content

Commit aed9df3

Browse files
author
William Gorge
committed
LKE-13676 refactor: actually use a json as data
1 parent 8d3d4d2 commit aed9df3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/Visualization/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@ export interface IVisualizationTimeline {
148148
}
149149

150150
export interface VisualizationThumbnailData {
151-
svg: string; // Should not exceed a certain size, cf isThumbnailTooLarge
151+
json: string; // Should not exceed a certain size, cf isThumbnailTooLarge
152152
}
153153

154154
export const MAX_VISUALIZATION_THUMBNAIL_SIZE_BYTES = 2_097_152; // 2MB
155155

156156
export function isThumbnailTooLarge(
157157
thumbnail: VisualizationThumbnailData | null | undefined
158158
): boolean {
159-
const thumbnailContent = thumbnail?.svg ?? '';
159+
const thumbnailContent = thumbnail?.json ?? '';
160160
const thumbnailSizeBytes = new TextEncoder().encode(thumbnailContent).byteLength;
161161
return thumbnailSizeBytes > MAX_VISUALIZATION_THUMBNAIL_SIZE_BYTES;
162162
}

0 commit comments

Comments
 (0)