mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-31 01:01:30 +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)
15 lines
421 B
TypeScript
15 lines
421 B
TypeScript
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) === '';
|
|
};
|