fix: Use native img tags for admin pages

- Replace next/image with native img tags in admin bottles, splits, tastings
- Remove hardcoded Supabase hostname from next.config.mjs
- Native img works with any hostname without config changes on deploy
This commit is contained in:
2026-01-19 11:46:26 +01:00
parent 3c02d33531
commit 948c70c7f2
4 changed files with 11 additions and 29 deletions

View File

@@ -10,15 +10,6 @@ const nextConfig = {
bodySizeLimit: '10mb',
},
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'supaapi.cloud.fluffigewolke.de',
pathname: '/storage/v1/object/public/**',
},
],
},
};
// Wrap with Sentry only if DSN is configured

View File

@@ -1,8 +1,7 @@
'use client';
import { useState, useMemo } from 'react';
import { Search, Filter, User, Wine, Calendar, Star, X, ChevronDown } from 'lucide-react';
import Image from 'next/image';
import { Search, User, Wine, Star, X } from 'lucide-react';
interface Bottle {
id: string;
@@ -205,12 +204,10 @@ export default function AdminBottlesList({ bottles }: AdminBottlesListProps) {
{/* Image */}
<div className="aspect-[4/3] relative bg-zinc-800">
{bottle.image_url ? (
<Image
<img
src={bottle.image_url}
alt={bottle.name || 'Bottle'}
fill
className="object-cover"
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
className="absolute inset-0 w-full h-full object-cover"
/>
) : (
<div className="absolute inset-0 flex items-center justify-center">

View File

@@ -1,8 +1,7 @@
'use client';
import { useState, useMemo } from 'react';
import { Search, User, Calendar, Share2, Users, Check, X, ExternalLink } from 'lucide-react';
import Image from 'next/image';
import { Search, User, Share2, Users, Check, X, ExternalLink } from 'lucide-react';
import Link from 'next/link';
interface Split {
@@ -127,12 +126,10 @@ export default function AdminSplitsList({ splits }: AdminSplitsListProps) {
{/* Image */}
<div className="aspect-[16/9] relative bg-zinc-800">
{split.bottle?.image_url ? (
<Image
<img
src={split.bottle.image_url}
alt={split.bottle.name || 'Bottle'}
fill
className="object-cover"
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
className="absolute inset-0 w-full h-full object-cover"
/>
) : (
<div className="absolute inset-0 flex items-center justify-center">

View File

@@ -2,7 +2,6 @@
import { useState, useMemo } from 'react';
import { Search, User, Star, Wine, MessageSquare } from 'lucide-react';
import Image from 'next/image';
interface Tasting {
id: string;
@@ -139,11 +138,9 @@ export default function AdminTastingsList({ tastings }: AdminTastingsListProps)
{/* Bottle Image */}
<div className="w-16 h-16 rounded-xl overflow-hidden bg-zinc-800 flex-shrink-0">
{tasting.bottle?.image_url ? (
<Image
<img
src={tasting.bottle.image_url}
alt={tasting.bottle.name || 'Bottle'}
width={64}
height={64}
className="w-full h-full object-cover"
/>
) : (