CSS Update React
This commit is contained in:
parent
2ca0689167
commit
79acf4aa52
11 changed files with 389 additions and 108 deletions
29
app/page.tsx
29
app/page.tsx
|
@ -1,10 +1,9 @@
|
|||
// LandingPage.tsx
|
||||
"use client"
|
||||
"use client";
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import Header from './Header';
|
||||
import AI from './AI';
|
||||
import FAQ from './Faq';
|
||||
import Documentation from './Documentation';
|
||||
import FAQ from './Faq'; // Ensure the import path is correct
|
||||
import Documentation from './Documentation'; // Ensure the import path is correct
|
||||
import History from './History';
|
||||
import Models from './Models';
|
||||
import './styles/master.css';
|
||||
|
@ -45,32 +44,32 @@ const LandingPage: React.FC = () => {
|
|||
|
||||
const handleViewChange = (view: 'AI' | 'FAQ' | 'Documentation') => {
|
||||
setView(view);
|
||||
// Optionally hide the History/Models section when changing view
|
||||
if (view !== 'AI') {
|
||||
setShowDivs(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<div className="container">
|
||||
<Header
|
||||
toggleDivs={toggleDivs}
|
||||
showDivs={showDivs}
|
||||
onViewChange={handleViewChange}
|
||||
showHistoryModelsToggle={view === 'AI'}
|
||||
showHistoryModelsToggle={true}
|
||||
showToggle={view === 'AI'} // Pass the condition here
|
||||
/>
|
||||
<div className="container">
|
||||
{view === 'AI' && (
|
||||
<div className={`left-panel ${showDivs ? '' : 'hidden'}`}>
|
||||
<div className={`left-panel ${showDivs ? 'visible' : 'hidden'}`}>
|
||||
{showDivs && (
|
||||
<div className="history-models">
|
||||
<History />
|
||||
<Models />
|
||||
</div>
|
||||
)}
|
||||
<div className={`conversation-container ${showDivs ? 'expanded' : 'collapsed'}`}>
|
||||
{view === 'AI' && <AI />}
|
||||
{view === 'FAQ' && <FAQ />}
|
||||
{view === 'Documentation' && <Documentation />}
|
||||
</div>
|
||||
</div>
|
||||
<div className={`conversation-container ${showDivs ? 'collapsed' : 'expanded'}`} ref={conversationRef}>
|
||||
{view === 'AI' && <AI />}
|
||||
{view === 'FAQ' && <FAQ />}
|
||||
{view === 'Documentation' && <Documentation />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue