diff --git a/frontend/src/components/layout/TopBar.tsx b/frontend/src/components/layout/TopBar.tsx index 41ddaac..5f44464 100644 --- a/frontend/src/components/layout/TopBar.tsx +++ b/frontend/src/components/layout/TopBar.tsx @@ -8,16 +8,11 @@ import { Upload, Settings, Menu, - Trash2, X, ShoppingBasket, } from 'lucide-react' import clsx from 'clsx' -import { usePhotoStore } from '../../store/photoStore' import { useFilterStore, hasActiveFilters } from '../../store/filterStore' -import { photos } from '../../services/api' -import { toast } from '../ToastContainer' -import { useMutation, useQueryClient } from '@tanstack/react-query' import { useHeapsQuery } from '../../hooks/useHeapsQuery' import muliLogo from '../../assets/muli-logo.png' @@ -55,31 +50,12 @@ export function TopBar() { }, [searchQuery, storeQ, setStoreQ]) const [viewMode, setViewMode] = useState<'grid' | 'list'>('grid') - const selectedPhotos = usePhotoStore((state) => state.selectedPhotos) - const clearSelection = usePhotoStore((state) => state.clearSelection) - const selectedCount = selectedPhotos.length - const queryClient = useQueryClient() - // Currently active heap (for the T shortcut). Shown as a pill so the user - // always knows where their next T-press will land. + // Currently active heap. Shown as a pill so the user always knows where + // their next P-press will land. const { data: heapsList = [] } = useHeapsQuery() const activeHeap = heapsList.find((h) => h.is_active) - - // Mutation for discarding selected photos - const discardPhotosMutation = useMutation({ - mutationFn: async () => { - await photos.bulkUpdate(selectedPhotos, { discard: true }) - }, - onSuccess: () => { - toast.success('Discarded', `${selectedCount} photo${selectedCount > 1 ? 's' : ''} discarded`) - clearSelection() - queryClient.invalidateQueries({ queryKey: ['photos'] }) - }, - onError: (error: any) => { - toast.error('Failed to discard', error.message || 'An error occurred') - }, - }) - + return (
{/* Left Section - Menu and App Name */} @@ -100,28 +76,12 @@ export function TopBar() { {activeHeap && ( {activeHeap.name} )} - {selectedCount > 0 && ( - <> - - {selectedCount} selected - - - - )} {/* Center Section - Search */}