()
| 5 | import logo from '../../assets/logo.png'; |
| 6 | |
| 7 | const Header: React.FC = () => { |
| 8 | const { currentPipeline, createPipeline } = usePipelineStore(); |
| 9 | const [isSettingsOpen, setIsSettingsOpen] = useState(false); |
| 10 | |
| 11 | return ( |
| 12 | <> |
| 13 | <header className="bg-secondary border-b border-border px-6 py-3 flex items-center justify-between"> |
| 14 | <div className="flex items-center space-x-4"> |
| 15 | <div className="flex items-center space-x-2"> |
| 16 | <img src={logo} alt="ScrapeCraft" className="h-8 w-8" /> |
| 17 | <h1 className="text-xl font-semibold text-primary">ScrapeCraft</h1> |
| 18 | </div> |
| 19 | {currentPipeline && ( |
| 20 | <span className="text-sm text-muted"> |
| 21 | {currentPipeline.name} |
| 22 | </span> |
| 23 | )} |
| 24 | </div> |
| 25 | |
| 26 | <div className="flex items-center space-x-3"> |
| 27 | <Button |
| 28 | variant="secondary" |
| 29 | size="sm" |
| 30 | onClick={() => createPipeline({ |
| 31 | name: `Pipeline ${Date.now()}`, |
| 32 | description: 'New scraping pipeline' |
| 33 | })} |
| 34 | > |
| 35 | New Pipeline |
| 36 | </Button> |
| 37 | <Button |
| 38 | variant="secondary" |
| 39 | size="sm" |
| 40 | onClick={() => setIsSettingsOpen(true)} |
| 41 | > |
| 42 | Settings |
| 43 | </Button> |
| 44 | </div> |
| 45 | </header> |
| 46 | |
| 47 | <SettingsModal |
| 48 | isOpen={isSettingsOpen} |
| 49 | onClose={() => setIsSettingsOpen(false)} |
| 50 | /> |
| 51 | </> |
| 52 | ); |
| 53 | }; |
| 54 | |
| 55 | export default Header; |
nothing calls this directly
no outgoing calls
no test coverage detected