2024-09-18 10:03:36 +02:00
|
|
|
// Header.tsx
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
interface HeaderProps {
|
|
|
|
toggleDivs: () => void;
|
|
|
|
showDivs: boolean;
|
2024-09-19 09:54:00 +02:00
|
|
|
onViewChange: (view: 'AI' | 'FAQ' | 'Documentation') => void;
|
|
|
|
showHistoryModelsToggle: boolean;
|
2024-09-18 10:03:36 +02:00
|
|
|
}
|
|
|
|
|
2024-09-19 09:54:00 +02:00
|
|
|
const Header: React.FC<HeaderProps> = ({ toggleDivs, showDivs, onViewChange, showHistoryModelsToggle }) => {
|
2024-09-18 10:03:36 +02:00
|
|
|
return (
|
|
|
|
<header>
|
|
|
|
<div className="header-menu">
|
|
|
|
<ul>
|
|
|
|
<li>
|
2024-09-19 09:54:00 +02:00
|
|
|
<a href="#" onClick={() => onViewChange('AI')}>
|
2024-09-18 10:03:36 +02:00
|
|
|
<img src="/img/logo.png" alt="logo" />
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
2024-09-19 09:54:00 +02:00
|
|
|
<a href="#" onClick={() => onViewChange('Documentation')}>
|
|
|
|
Documentation
|
|
|
|
</a>
|
2024-09-18 10:03:36 +02:00
|
|
|
</li>
|
|
|
|
<li>
|
2024-09-19 09:54:00 +02:00
|
|
|
<a href="#" onClick={() => onViewChange('FAQ')}>
|
|
|
|
FAQ
|
|
|
|
</a>
|
2024-09-18 10:03:36 +02:00
|
|
|
</li>
|
2024-09-19 09:54:00 +02:00
|
|
|
{showHistoryModelsToggle && (
|
|
|
|
<li>
|
|
|
|
<button onClick={toggleDivs}>
|
|
|
|
{showDivs ? "Hide History and Models" : "Show History and Models"}
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
)}
|
2024-09-18 10:03:36 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Header;
|