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:
@@ -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 {
|
||||
@@ -120,19 +119,17 @@ export default function AdminSplitsList({ splits }: AdminSplitsListProps) {
|
||||
<div
|
||||
key={split.id}
|
||||
className={`bg-zinc-900 rounded-2xl border overflow-hidden transition-colors ${split.is_active
|
||||
? 'border-zinc-800 hover:border-zinc-700'
|
||||
: 'border-zinc-800/50 opacity-60'
|
||||
? 'border-zinc-800 hover:border-zinc-700'
|
||||
: 'border-zinc-800/50 opacity-60'
|
||||
}`}
|
||||
>
|
||||
{/* 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">
|
||||
@@ -142,8 +139,8 @@ export default function AdminSplitsList({ splits }: AdminSplitsListProps) {
|
||||
|
||||
{/* Status Badge */}
|
||||
<span className={`absolute top-2 left-2 px-2 py-1 text-[10px] font-bold rounded-lg flex items-center gap-1 ${split.is_active
|
||||
? 'bg-green-600/90 text-white'
|
||||
: 'bg-zinc-700/90 text-zinc-300'
|
||||
? 'bg-green-600/90 text-white'
|
||||
: 'bg-zinc-700/90 text-zinc-300'
|
||||
}`}>
|
||||
{split.is_active ? <Check size={10} /> : <X size={10} />}
|
||||
{split.is_active ? 'Active' : 'Closed'}
|
||||
|
||||
Reference in New Issue
Block a user