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:
@@ -10,15 +10,6 @@ const nextConfig = {
|
|||||||
bodySizeLimit: '10mb',
|
bodySizeLimit: '10mb',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
images: {
|
|
||||||
remotePatterns: [
|
|
||||||
{
|
|
||||||
protocol: 'https',
|
|
||||||
hostname: 'supaapi.cloud.fluffigewolke.de',
|
|
||||||
pathname: '/storage/v1/object/public/**',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Wrap with Sentry only if DSN is configured
|
// Wrap with Sentry only if DSN is configured
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState, useMemo } from 'react';
|
import { useState, useMemo } from 'react';
|
||||||
import { Search, Filter, User, Wine, Calendar, Star, X, ChevronDown } from 'lucide-react';
|
import { Search, User, Wine, Star, X } from 'lucide-react';
|
||||||
import Image from 'next/image';
|
|
||||||
|
|
||||||
interface Bottle {
|
interface Bottle {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -205,12 +204,10 @@ export default function AdminBottlesList({ bottles }: AdminBottlesListProps) {
|
|||||||
{/* Image */}
|
{/* Image */}
|
||||||
<div className="aspect-[4/3] relative bg-zinc-800">
|
<div className="aspect-[4/3] relative bg-zinc-800">
|
||||||
{bottle.image_url ? (
|
{bottle.image_url ? (
|
||||||
<Image
|
<img
|
||||||
src={bottle.image_url}
|
src={bottle.image_url}
|
||||||
alt={bottle.name || 'Bottle'}
|
alt={bottle.name || 'Bottle'}
|
||||||
fill
|
className="absolute inset-0 w-full h-full object-cover"
|
||||||
className="object-cover"
|
|
||||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="absolute inset-0 flex items-center justify-center">
|
<div className="absolute inset-0 flex items-center justify-center">
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState, useMemo } from 'react';
|
import { useState, useMemo } from 'react';
|
||||||
import { Search, User, Calendar, Share2, Users, Check, X, ExternalLink } from 'lucide-react';
|
import { Search, User, Share2, Users, Check, X, ExternalLink } from 'lucide-react';
|
||||||
import Image from 'next/image';
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
interface Split {
|
interface Split {
|
||||||
@@ -127,12 +126,10 @@ export default function AdminSplitsList({ splits }: AdminSplitsListProps) {
|
|||||||
{/* Image */}
|
{/* Image */}
|
||||||
<div className="aspect-[16/9] relative bg-zinc-800">
|
<div className="aspect-[16/9] relative bg-zinc-800">
|
||||||
{split.bottle?.image_url ? (
|
{split.bottle?.image_url ? (
|
||||||
<Image
|
<img
|
||||||
src={split.bottle.image_url}
|
src={split.bottle.image_url}
|
||||||
alt={split.bottle.name || 'Bottle'}
|
alt={split.bottle.name || 'Bottle'}
|
||||||
fill
|
className="absolute inset-0 w-full h-full object-cover"
|
||||||
className="object-cover"
|
|
||||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="absolute inset-0 flex items-center justify-center">
|
<div className="absolute inset-0 flex items-center justify-center">
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import { useState, useMemo } from 'react';
|
import { useState, useMemo } from 'react';
|
||||||
import { Search, User, Star, Wine, MessageSquare } from 'lucide-react';
|
import { Search, User, Star, Wine, MessageSquare } from 'lucide-react';
|
||||||
import Image from 'next/image';
|
|
||||||
|
|
||||||
interface Tasting {
|
interface Tasting {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -139,11 +138,9 @@ export default function AdminTastingsList({ tastings }: AdminTastingsListProps)
|
|||||||
{/* Bottle Image */}
|
{/* Bottle Image */}
|
||||||
<div className="w-16 h-16 rounded-xl overflow-hidden bg-zinc-800 flex-shrink-0">
|
<div className="w-16 h-16 rounded-xl overflow-hidden bg-zinc-800 flex-shrink-0">
|
||||||
{tasting.bottle?.image_url ? (
|
{tasting.bottle?.image_url ? (
|
||||||
<Image
|
<img
|
||||||
src={tasting.bottle.image_url}
|
src={tasting.bottle.image_url}
|
||||||
alt={tasting.bottle.name || 'Bottle'}
|
alt={tasting.bottle.name || 'Bottle'}
|
||||||
width={64}
|
|
||||||
height={64}
|
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user