build fix for sure for sure
This commit is contained in:
parent
5b7fd05a02
commit
b9137c2a10
3 changed files with 4 additions and 9 deletions
|
@ -14,7 +14,7 @@ const InputOutputBackend: React.FC = () => {
|
|||
}
|
||||
|
||||
// Define state variables for user preferences and messages
|
||||
const [chatHistory, setChatHistory, setSelectedIndex, updateMessage] = useChatHistory()
|
||||
const [chatHistory, setSelectedIndex, setChatHistory, updateMessage] = useChatHistory()
|
||||
const [preferredCurrency, setPreferredCurrency] = useState<string>("USD");
|
||||
const [preferredLanguage, setPreferredLanguage] = useState<string>("english");
|
||||
const [timeFormat, setTimeFormat] = useState<string>("24-hour");
|
||||
|
|
|
@ -2,18 +2,13 @@ import React, { useState } from 'react';
|
|||
import { useChatHistory } from '../hooks/useChatHistory';
|
||||
|
||||
const History: React.FC = () => {
|
||||
const [chatHistory, setChatHistory, setSelectedIndex] = useChatHistory()
|
||||
const [chatHistory, setSelectedIndex] = useChatHistory()
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const [inputValue, setInputValue] = useState<string>('');
|
||||
|
||||
setChatHistory(chatHistory)
|
||||
|
||||
const handleEditButtonClick = () => {
|
||||
setIsEditing(true);
|
||||
|
||||
/* Thank you Eslint for this masterpiece of a code snippet */
|
||||
setChatHistory(chatHistory)
|
||||
/* Wow i feel so secure now */
|
||||
};
|
||||
|
||||
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
|
|
|
@ -31,7 +31,7 @@ const setGlobalState = (newState: GlobalChatHistory): void => {
|
|||
listeners.forEach((listener) => listener(globalChatHistory))
|
||||
}
|
||||
|
||||
export const useChatHistory = (): [GlobalChatHistory, (newState:GlobalChatHistory) => void, (index:number)=>void, (messageIndex: number, newContent:string)=> void] => {
|
||||
export const useChatHistory = (): [GlobalChatHistory, (index:number)=>void, (newState:GlobalChatHistory) => void,(messageIndex: number, newContent:string)=> void] => {
|
||||
const [state, setState] = useState<GlobalChatHistory>(globalChatHistory)
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -65,5 +65,5 @@ export const useChatHistory = (): [GlobalChatHistory, (newState:GlobalChatHistor
|
|||
}
|
||||
}
|
||||
|
||||
return [state, setGlobalState, setSelectedIndex, updateMessage]
|
||||
return [state, setSelectedIndex, setGlobalState, updateMessage]
|
||||
}
|
Loading…
Reference in a new issue