feat: implement buddies and tasting sessions features
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import React, { useState, useMemo } from 'react';
|
||||
import { Calendar, Star, ArrowUpDown, Clock, Trash2, Loader2 } from 'lucide-react';
|
||||
import { Calendar, Star, ArrowUpDown, Clock, Trash2, Loader2, Users } from 'lucide-react';
|
||||
import { deleteTasting } from '@/services/delete-tasting';
|
||||
|
||||
interface Tasting {
|
||||
@@ -13,6 +13,12 @@ interface Tasting {
|
||||
is_sample?: boolean;
|
||||
bottle_id: string;
|
||||
created_at: string;
|
||||
tasting_tags?: {
|
||||
buddies: {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
}[];
|
||||
}
|
||||
|
||||
interface TastingListProps {
|
||||
@@ -156,6 +162,20 @@ export default function TastingList({ initialTastings }: TastingListProps) {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{note.tasting_tags && note.tasting_tags.length > 0 && (
|
||||
<div className="pt-3 flex flex-wrap gap-2 border-t border-zinc-100 dark:border-zinc-800">
|
||||
<span className="text-[10px] font-black text-zinc-400 uppercase tracking-widest flex items-center gap-1.5 mr-1">
|
||||
<Users size={12} className="text-amber-500" />
|
||||
Gekostet mit:
|
||||
</span>
|
||||
{note.tasting_tags.map((tag) => (
|
||||
<span key={tag.buddies.id} className="text-[10px] font-bold text-zinc-600 dark:text-zinc-400 bg-zinc-100 dark:bg-zinc-800/80 px-2 py-0.5 rounded-full">
|
||||
{tag.buddies.name}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user