Spaces:
Sleeping
Sleeping
Update src/components/Navigation.tsx
Browse files
src/components/Navigation.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
import React from 'react';
|
| 2 |
-
import { ShoppingBag, ChevronLeft, Zap } from 'lucide-react';
|
| 3 |
import { APP_NAME } from '../constants';
|
| 4 |
|
| 5 |
interface NavigationProps {
|
| 6 |
onBack?: () => void;
|
| 7 |
showBack: boolean;
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
-
const Navigation: React.FC<NavigationProps> = ({ onBack, showBack }) => {
|
| 11 |
return (
|
| 12 |
<nav className="sticky top-0 z-50 bg-white border-b border-gray-100 shadow-sm h-16 flex items-center px-4 justify-between">
|
| 13 |
<div className="flex items-center gap-2">
|
|
@@ -28,10 +29,17 @@ const Navigation: React.FC<NavigationProps> = ({ onBack, showBack }) => {
|
|
| 28 |
</div>
|
| 29 |
|
| 30 |
<div className="flex items-center gap-4">
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
<div className="w-8 h-8 bg-gray-200 rounded-full overflow-hidden border border-gray-300">
|
| 36 |
<img src="https://picsum.photos/100/100" alt="Profile" className="w-full h-full object-cover" />
|
| 37 |
</div>
|
|
|
|
| 1 |
import React from 'react';
|
| 2 |
+
import { ShoppingBag, ChevronLeft, Zap, BatteryLow, BatteryFull } from 'lucide-react';
|
| 3 |
import { APP_NAME } from '../constants';
|
| 4 |
|
| 5 |
interface NavigationProps {
|
| 6 |
onBack?: () => void;
|
| 7 |
showBack: boolean;
|
| 8 |
+
cooldown?: number;
|
| 9 |
}
|
| 10 |
|
| 11 |
+
const Navigation: React.FC<NavigationProps> = ({ onBack, showBack, cooldown = 0 }) => {
|
| 12 |
return (
|
| 13 |
<nav className="sticky top-0 z-50 bg-white border-b border-gray-100 shadow-sm h-16 flex items-center px-4 justify-between">
|
| 14 |
<div className="flex items-center gap-2">
|
|
|
|
| 29 |
</div>
|
| 30 |
|
| 31 |
<div className="flex items-center gap-4">
|
| 32 |
+
{cooldown > 0 ? (
|
| 33 |
+
<div className="flex items-center gap-2 px-3 py-1.5 bg-amber-50 rounded-full border border-amber-100">
|
| 34 |
+
<BatteryLow className="w-3 h-3 text-amber-500" />
|
| 35 |
+
<span className="text-[10px] font-bold text-amber-600 uppercase tracking-tighter">Cooling {cooldown}s</span>
|
| 36 |
+
</div>
|
| 37 |
+
) : (
|
| 38 |
+
<div className="flex items-center gap-2 px-3 py-1.5 bg-emerald-50 rounded-full border border-emerald-100">
|
| 39 |
+
<BatteryFull className="w-3 h-3 text-emerald-500" />
|
| 40 |
+
<span className="text-[10px] font-bold text-emerald-600 uppercase tracking-tighter">Ready</span>
|
| 41 |
+
</div>
|
| 42 |
+
)}
|
| 43 |
<div className="w-8 h-8 bg-gray-200 rounded-full overflow-hidden border border-gray-300">
|
| 44 |
<img src="https://picsum.photos/100/100" alt="Profile" className="w-full h-full object-cover" />
|
| 45 |
</div>
|