Started the Rework

This commit is contained in:
Sage The DM 2024-09-19 09:54:00 +02:00
parent 2327fc343a
commit a2c960b710
11 changed files with 177 additions and 61 deletions

View file

@ -4,29 +4,37 @@ import React from 'react';
interface HeaderProps {
toggleDivs: () => void;
showDivs: boolean;
onViewChange: (view: 'AI' | 'FAQ' | 'Documentation') => void;
showHistoryModelsToggle: boolean;
}
const Header: React.FC<HeaderProps> = ({ toggleDivs, showDivs }) => {
const Header: React.FC<HeaderProps> = ({ toggleDivs, showDivs, onViewChange, showHistoryModelsToggle }) => {
return (
<header>
<div className="header-menu">
<ul>
<li>
<a href="/">
<a href="#" onClick={() => onViewChange('AI')}>
<img src="/img/logo.png" alt="logo" />
</a>
</li>
<li>
<a href="/documentation">Documentation</a>
<a href="#" onClick={() => onViewChange('Documentation')}>
Documentation
</a>
</li>
<li>
<a href="/faq">FAQ</a>
</li>
<li>
<button onClick={toggleDivs}>
{showDivs ? "Hide History and Models" : "Show History and Models"}
</button>
<a href="#" onClick={() => onViewChange('FAQ')}>
FAQ
</a>
</li>
{showHistoryModelsToggle && (
<li>
<button onClick={toggleDivs}>
{showDivs ? "Hide History and Models" : "Show History and Models"}
</button>
</li>
)}
</ul>
</div>
</header>