// Helper function to handle media URLs from Strapi
export function getStrapiMedia(url: string | null, baseUrl: string) {
  if (url == null) return null;
  // Return as-is if it's a data URL (base64)
  if (url.startsWith("data:")) return url;
  // Return as-is if it's an absolute URL
  if (url.startsWith("http") || url.startsWith("//")) return url;
  // Prepend baseUrl for relative URLs
  return `${baseUrl}${url}`;
} 