fix: disable sending messages if both application and conversation are empty and add loading to all pages (#134)
* feat: add loading to all pages * fix: disable sending messages if both application and conversation are empty * feat: add chatSpin class to Spin of chat
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useLocation } from 'umi';
|
||||
import { KnowledgeSearchParams } from '@/constants/knowledge';
|
||||
import { useLocation, useSearchParams } from 'umi';
|
||||
|
||||
export enum SegmentIndex {
|
||||
Second = '2',
|
||||
@@ -19,3 +20,14 @@ export const useSecondPathName = () => {
|
||||
export const useThirdPathName = () => {
|
||||
return useSegmentedPathName(SegmentIndex.Third);
|
||||
};
|
||||
|
||||
export const useGetKnowledgeSearchParams = () => {
|
||||
const [currentQueryParameters] = useSearchParams();
|
||||
|
||||
return {
|
||||
documentId:
|
||||
currentQueryParameters.get(KnowledgeSearchParams.DocumentId) || '',
|
||||
knowledgeId:
|
||||
currentQueryParameters.get(KnowledgeSearchParams.KnowledgeId) || '',
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user