diff --git a/attached_assets/image_1756402192466.png b/attached_assets/image_1756402192466.png new file mode 100644 index 0000000..93c3c3a Binary files /dev/null and b/attached_assets/image_1756402192466.png differ diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index 149e1fe..8debb3f 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -5,7 +5,8 @@ import { type Video } from "@shared/schema"; import go4LogoPath from "@assets/go4_1756394900352.png"; // Helper functions -const formatViews = (views: number): string => { +const formatViews = (views: number | undefined): string => { + if (!views) return '0'; if (views >= 1000000) return `${(views / 1000000).toFixed(1)}M`; if (views >= 1000) return `${(views / 1000).toFixed(1)}K`; return views.toString(); diff --git a/server/bunny.ts b/server/bunny.ts index a1effdf..81066ef 100644 --- a/server/bunny.ts +++ b/server/bunny.ts @@ -228,4 +228,6 @@ export class BunnyService { return `${baseUrl}?token=${token}&expires=${expires}`; } -} \ No newline at end of file +} + +export const bunnyService = new BunnyService(); \ No newline at end of file