Fix: EsLint Problem of index.tsx (#8710)
'handleOk' was used before it was defined.eslint@typescript-eslint/no-use-before-define ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
5b52b7561a
commit
30065e2f43
1 changed files with 7 additions and 6 deletions
|
|
@ -50,12 +50,6 @@ const OllamaModal = ({
|
|||
|
||||
const { t } = useTranslate('setting');
|
||||
|
||||
const handleKeyDown = async (e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter') {
|
||||
await handleOk();
|
||||
}
|
||||
};
|
||||
|
||||
const handleOk = async () => {
|
||||
const values = await form.validateFields();
|
||||
const modelType =
|
||||
|
|
@ -73,6 +67,13 @@ const OllamaModal = ({
|
|||
|
||||
onOk?.(data);
|
||||
};
|
||||
|
||||
const handleKeyDown = async (e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter') {
|
||||
await handleOk();
|
||||
}
|
||||
};
|
||||
|
||||
const url =
|
||||
llmFactoryToUrlMap[llmFactory as LlmFactory] ||
|
||||
'https://github.com/infiniflow/ragflow/blob/main/docs/guides/models/deploy_local_llm.mdx';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue