mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 23:46:52 +08:00
### What problem does this PR solve? Fix: Added styles for empty states on the page. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -58,7 +58,7 @@ export const useSelectLlmOptions = () => {
|
||||
function buildLlmOptionsWithIcon(x: IThirdOAIModel) {
|
||||
return {
|
||||
label: (
|
||||
<div className="flex items-center justify-center gap-6">
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<LlmIcon
|
||||
name={getLLMIconName(x.fid, x.llm_name)}
|
||||
width={24}
|
||||
|
||||
@ -14,9 +14,16 @@ export const useNavigatePage = () => {
|
||||
const [searchParams] = useSearchParams();
|
||||
const { id } = useParams();
|
||||
|
||||
const navigateToDatasetList = useCallback(() => {
|
||||
navigate(Routes.Datasets);
|
||||
}, [navigate]);
|
||||
const navigateToDatasetList = useCallback(
|
||||
({ isCreate = false }: { isCreate?: boolean }) => {
|
||||
if (isCreate) {
|
||||
navigate(Routes.Datasets + '?isCreate=true');
|
||||
} else {
|
||||
navigate(Routes.Datasets);
|
||||
}
|
||||
},
|
||||
[navigate],
|
||||
);
|
||||
|
||||
const navigateToDataset = useCallback(
|
||||
(id: string) => () => {
|
||||
|
||||
@ -54,7 +54,7 @@ export const useFetchTenantInfo = (
|
||||
): ResponseGetType<ITenantInfo> => {
|
||||
const { t } = useTranslation();
|
||||
const { data, isFetching: loading } = useQuery({
|
||||
queryKey: ['tenantInfo'],
|
||||
queryKey: ['tenantInfo', showEmptyModelWarn],
|
||||
initialData: {},
|
||||
gcTime: 0,
|
||||
queryFn: async () => {
|
||||
@ -99,7 +99,6 @@ export const useSelectParserList = (): Array<{
|
||||
label: string;
|
||||
}> => {
|
||||
const { data: tenantInfo } = useFetchTenantInfo(true);
|
||||
|
||||
const parserList = useMemo(() => {
|
||||
const parserArray: Array<string> = tenantInfo?.parser_ids?.split(',') ?? [];
|
||||
return parserArray.map((x) => {
|
||||
|
||||
Reference in New Issue
Block a user