fix(images): add www.canina.de to next.config and make SafeImage resilient to external domains
Some checks failed
Deploy Canina / deploy (push) Has been cancelled

This commit is contained in:
parsa aghaei 2026-08-18 21:00:29 +03:30
parent 3ea1d0d8c1
commit 020614c50e
5 changed files with 558 additions and 551 deletions

View File

@ -43,6 +43,8 @@ export default function SafeImage({
);
}
const isExternal = typeof src === 'string' && (src.startsWith('http://') || src.startsWith('https://'));
return (
<div className={cn("relative overflow-hidden group flex items-center justify-center", className)}>
{loading && (
@ -56,6 +58,7 @@ export default function SafeImage({
width={500}
height={500}
loading="lazy"
unoptimized={isExternal}
className={cn(
"transition-all duration-700 w-full h-full",
imgClassName,

View File

@ -104,10 +104,10 @@ export default function VetGallery({ testimonials = [] }: { testimonials?: Testi
<Star className="w-3 h-3" />
{getText('videos_badge', "Vet Insights")}
</div>
<h2 className="text-4xl md:text-5xl font-black text-medical-gray-900 leading-tight font-lalezar tracking-wide">
<h2 className="text-4xl md:text-5xl font-black text-medical-gray-900 leading-tight font-lalezar tracking-wide" suppressHydrationWarning>
{getText('videos_title', "مشاوره ویدئویی")} <span className="text-canina-blue underline decoration-4 decoration-canina-blue/20 underline-offset-8">{getText('videos_title_highlight', "دوست دامپزشک پت شما")}</span>
</h2>
<p className="text-lg text-medical-gray-500 font-medium mt-6">
<p className="text-lg text-medical-gray-500 font-medium mt-6" suppressHydrationWarning>
{getText('videos_desc', "تیم علمی و فرموله‌کنندگان کمپانی کنینا در آلمان مستقیماً با شما صحبت می‌کنند؛ آشنایی با نحوه مصرف، مزایای بالینی و دانش پزشکی پشت هر محصول.")}
</p>
</div>

View File

@ -41,6 +41,10 @@ const nextConfig: NextConfig = {
protocol: 'https',
hostname: 'canina.de',
},
{
protocol: 'https',
hostname: 'www.canina.de',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff