Misc fixes: Storefront shop layout, product filter UI improvements, and cart badge styling

This commit is contained in:
Dwindi Ramadhana
2026-06-02 19:37:50 +07:00
parent dcdd6d8cac
commit fd8eb38512
10 changed files with 402 additions and 131 deletions

View File

@@ -1,7 +1,7 @@
import React, { useState, useCallback } from 'react';
import { useQuery, useMutation, useQueryClient, keepPreviousData } from '@tanstack/react-query';
import { api } from '@/lib/api';
import { Filter, Package, Trash2, RefreshCw, MoreHorizontal, Eye, Edit } from 'lucide-react';
import { Filter, Package, Trash2, RefreshCw, MoreHorizontal, Eye, Edit, Search } from 'lucide-react';
import { ErrorCard } from '@/components/ErrorCard';
import { getPageLoadErrorMessage } from '@/lib/errorHandling';
import { __ } from '@/lib/i18n';
@@ -18,6 +18,7 @@ import {
} from '@/components/ui/alert-dialog';
import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
import { Input } from '@/components/ui/input';
import { toast } from 'sonner';
import {
Select,
@@ -253,6 +254,16 @@ export default function Products() {
<RefreshCw className={`w-4 h-4 ${isRefreshing ? 'animate-spin' : ''}`} />
{__('Refresh')}
</button>
<div className="relative">
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" />
<Input
placeholder={__('Search products...')}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-[200px] lg:w-[250px] !pl-9"
/>
</div>
</div>
<div className="flex gap-2 items-center">