mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 07:26:47 +08:00
### What problem does this PR solve? Fix(i18n): Added new translations #3221 - Added and updated internationalization translations in multiple components ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
34 lines
862 B
TypeScript
34 lines
862 B
TypeScript
import { t } from 'i18next';
|
|
import { Loader2 } from 'lucide-react';
|
|
import { PropsWithChildren } from 'react';
|
|
import { TableCell, TableRow } from './ui/table';
|
|
|
|
type IProps = { columnsLength: number };
|
|
|
|
function Row({ children, columnsLength }: PropsWithChildren & IProps) {
|
|
return (
|
|
<TableRow>
|
|
<TableCell colSpan={columnsLength} className="h-24 text-center">
|
|
{children}
|
|
</TableCell>
|
|
</TableRow>
|
|
);
|
|
}
|
|
|
|
export function TableSkeleton({
|
|
columnsLength,
|
|
children,
|
|
}: PropsWithChildren & IProps) {
|
|
return (
|
|
<Row columnsLength={columnsLength}>
|
|
{children || (
|
|
<Loader2 className="animate-spin size-16 inline-block text-gray-400" />
|
|
)}
|
|
</Row>
|
|
);
|
|
}
|
|
|
|
export function TableEmpty({ columnsLength }: { columnsLength: number }) {
|
|
return <Row columnsLength={columnsLength}>{t('common.noResults')}</Row>;
|
|
}
|