feat: Improve Bottle Split UX
- Add 'Split starten' button to bottle detail page - Support flexible sample sizes (1-20cl) instead of fixed 5/10cl - Preselect bottle when coming from bottle page - Save sample sizes/shipping defaults to localStorage - Update schema: sample_sizes JSONB array - Update server actions and UI for dynamic sizes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import Link from 'next/link';
|
||||
import { ChevronLeft, Calendar, Award, Droplets, MapPin, Tag, ExternalLink, Package, Info, Loader2, WifiOff, CircleDollarSign, Wine, CheckCircle2, Circle, ChevronDown, Plus } from 'lucide-react';
|
||||
import { ChevronLeft, Calendar, Award, Droplets, MapPin, Tag, ExternalLink, Package, Info, Loader2, WifiOff, CircleDollarSign, Wine, CheckCircle2, Circle, ChevronDown, Plus, Share2 } from 'lucide-react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { updateBottle } from '@/services/update-bottle';
|
||||
import { getStorageUrl } from '@/lib/supabase';
|
||||
@@ -248,6 +248,13 @@ export default function BottleDetails({ bottleId, sessionId, userId }: BottleDet
|
||||
) : (
|
||||
<>
|
||||
<EditBottleForm bottle={bottle as any} />
|
||||
<Link
|
||||
href={`/splits/create?bottle=${bottle.id}`}
|
||||
className="px-5 py-3 bg-zinc-800 hover:bg-zinc-700 text-white rounded-2xl text-xs font-black uppercase tracking-widest flex items-center gap-2 transition-all border border-zinc-700 hover:border-orange-600/50"
|
||||
>
|
||||
<Share2 size={16} className="text-orange-500" />
|
||||
Split starten
|
||||
</Link>
|
||||
<DeleteBottleButton bottleId={bottle.id} />
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user