Compare commits
No commits in common. "bee54bbd296a7213e19a22651e534e654259e193" and "427a48a64d588f3a3367b2d5da64ac8949b6640d" have entirely different histories.
bee54bbd29
...
427a48a64d
2 changed files with 14 additions and 57 deletions
|
@ -34,35 +34,28 @@ const History: React.FC = () => {
|
||||||
{/* Populate with history items */}
|
{/* Populate with history items */}
|
||||||
{chatHistory.chats.map((chats, index) => (
|
{chatHistory.chats.map((chats, index) => (
|
||||||
<li key={index}>
|
<li key={index}>
|
||||||
<a href="#" onClick={() => handleHistoryClick(index)}>
|
<a href="#" onClick={() => handleHistoryClick(index)}>{chatHistory.chats[index].name}</a>
|
||||||
{chatHistory.chats[index].name}
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
<li>
|
<li>
|
||||||
{isEditing ? (
|
{isEditing ? (
|
||||||
<div className="input-container">
|
<div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
placeholder="Enter text"
|
placeholder="Enter text"
|
||||||
className="chat-input"
|
/>
|
||||||
/>
|
<button onClick={handleSaveButtonClick}>Save</button>
|
||||||
<button onClick={handleSaveButtonClick} className="save-btn">
|
</div>
|
||||||
Save
|
) : (
|
||||||
</button>
|
<button onClick={handleEditButtonClick}>{'New Chat'}</button>
|
||||||
</div>
|
)}
|
||||||
) : (
|
|
||||||
<button onClick={handleEditButtonClick} className="newChat-btn">
|
|
||||||
New Chat
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default History;
|
export default History;
|
||||||
|
|
|
@ -37,39 +37,3 @@
|
||||||
height: 86dvh;
|
height: 86dvh;
|
||||||
/* padding-bottom: 3dvh; */
|
/* padding-bottom: 3dvh; */
|
||||||
}
|
}
|
||||||
.input-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.chat-input {
|
|
||||||
border-color: var(--input-border-color);
|
|
||||||
color: var(--text-color);
|
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
width: 80%;
|
|
||||||
height: 50px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
.save-btn, .newChat-btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
text-align: center;
|
|
||||||
width: 20%;
|
|
||||||
height: 50px;
|
|
||||||
background-color: var(--input-button-color);
|
|
||||||
color: var(--text-color);
|
|
||||||
border: none;
|
|
||||||
font-size: 0.9em;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newChat-btn{
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue