Spaces:
Running

powerllm's picture
Upload components/Header.js with huggingface_hub
4b24575 verified
Raw History Blame Contribute Delete
3.91 kB
import React from 'react';
const Header = ({
currentMode,
onModeChange,
currentSession,
onSessionChange,
marketStatus,
onSearchChange,
searchQuery,
onToggleScanner,
isScannerActive
}) => {
return (
<header className="h-16 border-b border-gray-700 flex items-center justify-between px-6 bg-gray-900 shadow-lg z-50 relative">
<div className="flex items-center gap-3">
<div className="p-2 bg-blue-600/10 rounded-lg border border-blue-500/30">
<i className="fa-solid fa-chart-line text-blue-400 text-xl"></i>
</div>
<h1 className="font-semibold text-lg tracking-tight text-white">ICT Antigravity AI</h1>
<span className="px-2 py-0.5 text-xs font-medium bg-green-500/10 text-green-400 border border-green-500/20 rounded-full animate-pulse">
{marketStatus}
</span>
</div>
<div className="flex items-center gap-4">
<div className="flex items-center gap-2 bg-gray-800 rounded-lg p-1 border border-gray-600">
<input
type="text"
placeholder="Search concepts..."
value={searchQuery}
onChange={(e) => onSearchChange(e.target.value)}
className="bg-transparent border-none text-gray-200 text-sm focus:ring-0 w-48 p-1.5 placeholder-gray-500"
/>
<i className="fa-solid fa-search text-gray-400 text-sm"></i>
</div>
<div className="flex items-center gap-2">
<span className="text-sm text-gray-400 hidden sm:block">Mode:</span>
<select
value={currentMode}
onChange={onModeChange}
className="bg-gray-800 border border-gray-600 text-gray-200 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-24 p-1.5 outline-none"
>
<option value="free">Free</option>
<option value="paid">Pro</option>
</select>
</div>
<div className="flex items-center gap-2">
<span className="text-sm text-gray-400 hidden sm:block">Session:</span>
<select
value={currentSession}
onChange={onSessionChange}
className="bg-gray-800 border border-gray-600 text-gray-200 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-32 p-1.5 outline-none"
>
<option value="all">All Sessions</option>
<option value="asian">Asian</option>
<option value="london">London</option>
<option value="ny">NY</option>
<option value="overlap">Overlap</option>
</select>
</div>
<button
onClick={onToggleScanner}
className={`px-4 py-1.5 text-sm font-medium rounded-lg transition-all duration-300 flex items-center gap-2 ${
isScannerActive
? 'bg-blue-600 text-white shadow-lg shadow-blue-600/20'
: 'bg-gray-800 text-gray-300 hover:bg-gray-700 border border-gray-600'
}`}
>
{isScannerActive ? (
<>
<i className="fa-solid fa-database"></i>
Knowledge Base
</>
) : (
<>
<i className="fa-solid fa-magnifying-glass"></i>
Live Scanner
</>
)}
</button>
<a
href="https://huggingface.co/spaces/akhaliq/anycoder"
target="_blank"
rel="noopener noreferrer"
className="text-xs font-medium text-gray-400 hover:text-blue-400 transition-colors flex items-center gap-2 px-3 py-1.5 rounded-full bg-gray-800 border border-gray-600 hover:border-blue-500/50 hover:bg-blue-500/10"
>
<span>anycoder</span>
<i className="fa-solid fa-arrow-up-right-from-square text-[10px]"></i>
</a>
</div>
</header>
);
};
export default Header;