Changes: - Add FAL_KEY and GEMINI_API_KEY to .env.example - Update picture-it to use ~/.config/opencode/.env (unified creds) - Remove shodh-memory skill (no longer used) - Remove alphaear-* skills (deprecated) - Remove thai-frontend-dev skill (replaced by website-creator) - Remove theme-factory skill - Add mql-developer skill (MQL5 trading) - Add ecommerce-astro skill (Astro e-commerce) - Add website-creator skill (Next.js + Payload CMS) - Update install script for new skills
19 lines
635 B
TypeScript
19 lines
635 B
TypeScript
import { useCartStore } from '../../stores/cart';
|
|
import { ShoppingCart } from 'lucide-react';
|
|
|
|
export default function CartBadge() {
|
|
const { items, toggleCart } = useCartStore();
|
|
const count = items.reduce((sum, item) => sum + item.quantity, 0);
|
|
|
|
return (
|
|
<button onClick={toggleCart} className="relative p-2 hover:bg-gray-100 rounded-lg">
|
|
<ShoppingCart className="w-6 h-6" />
|
|
{count > 0 && (
|
|
<span className="absolute -top-1 -right-1 bg-red-500 text-white text-xs w-5 h-5 rounded-full flex items-center justify-center">
|
|
{count > 9 ? '9+' : count}
|
|
</span>
|
|
)}
|
|
</button>
|
|
);
|
|
}
|