File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,5 +3,9 @@ export type ImageSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'
33export function getImageUrl ( src : string | null | undefined , _size : ImageSize = 'md' ) : string | undefined {
44 if ( ! src )
55 return undefined
6- return src
6+
7+ if ( src . startsWith ( 'http://' ) || src . startsWith ( 'https://' ) )
8+ return src
9+
10+ return `https://nitroping.dev/${ src } `
711}
Original file line number Diff line number Diff line change @@ -8,13 +8,10 @@ export function cn(...inputs: ClassValue[]) {
88
99export function getImageUrl ( path : string | null | undefined ) : string {
1010 if ( ! path )
11- return '/images/book-placeholder.svg '
11+ return ''
1212
13- // If already a full URL, return as is
14- if ( path . startsWith ( 'http://' ) || path . startsWith ( 'https://' ) ) {
13+ if ( path . startsWith ( 'http://' ) || path . startsWith ( 'https://' ) )
1514 return path
16- }
1715
18- // Add CDN prefix for S3 paths
19- return `https://cdn.sayfa.app/${ path } `
16+ return `https://nitroping.dev/${ path } `
2017}
You can’t perform that action at this time.
0 commit comments