diff --git a/src/components/BottleGrid.tsx b/src/components/BottleGrid.tsx
index e313572..41f9272 100644
--- a/src/components/BottleGrid.tsx
+++ b/src/components/BottleGrid.tsx
@@ -2,8 +2,9 @@
import React, { useState, useMemo } from 'react';
import Link from 'next/link';
-import { Search, Filter, X, Calendar, Clock, Package, Lock, Unlock, Ghost, FlaskConical, AlertCircle, Trash2, AlertTriangle } from 'lucide-react';
+import { Search, Filter, X, Calendar, Clock, Package, Lock, Unlock, Ghost, FlaskConical, AlertCircle, Trash2, AlertTriangle, PlusCircle } from 'lucide-react';
import { getStorageUrl } from '@/lib/supabase';
+import { useSearchParams } from 'next/navigation';
interface Bottle {
id: string;
@@ -22,9 +23,10 @@ interface Bottle {
interface BottleCardProps {
bottle: Bottle;
+ sessionId?: string | null;
}
-function BottleCard({ bottle }: BottleCardProps) {
+function BottleCard({ bottle, sessionId }: BottleCardProps) {
const statusConfig = {
open: { icon: Unlock, color: 'bg-amber-500/80 border-amber-400/50', label: 'Offen' },
sampled: { icon: FlaskConical, color: 'bg-purple-500/80 border-purple-400/50', label: 'Sample' },
@@ -36,7 +38,10 @@ function BottleCard({ bottle }: BottleCardProps) {
const statusStyle = statusConfig[bottle.status as keyof typeof statusConfig] || statusConfig.sealed;
return (
-
+
+ {sessionId && (
+
+
+ ZU SESSION HINZUFÜGEN
+
+ )}
+
{bottle.last_tasted && (
@@ -101,6 +113,9 @@ interface BottleGridProps {
}
export default function BottleGrid({ bottles }: BottleGridProps) {
+ const searchParams = useSearchParams();
+ const sessionId = searchParams.get('session_id');
+
const [searchQuery, setSearchQuery] = useState('');
const [selectedCategory, setSelectedCategory] = useState
(null);
const [selectedDistillery, setSelectedDistillery] = useState(null);
@@ -269,7 +284,7 @@ export default function BottleGrid({ bottles }: BottleGridProps) {
{filteredBottles.length > 0 ? (
{filteredBottles.map((bottle) => (
-
+
))}
) : (