mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-05 10:05:05 +08:00
### What problem does this PR solve? Feat: Render chat page #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
14
web/src/pages/next-chats/hooks/use-button-disabled.tsx
Normal file
14
web/src/pages/next-chats/hooks/use-button-disabled.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import { useGetChatSearchParams } from '@/hooks/use-chat-request';
|
||||
import { trim } from 'lodash';
|
||||
import { useParams } from 'umi';
|
||||
|
||||
export const useGetSendButtonDisabled = () => {
|
||||
const { conversationId } = useGetChatSearchParams();
|
||||
const { id: dialogId } = useParams();
|
||||
|
||||
return dialogId === '' || conversationId === '';
|
||||
};
|
||||
|
||||
export const useSendButtonDisabled = (value: string) => {
|
||||
return trim(value) === '';
|
||||
};
|
||||
Reference in New Issue
Block a user