remove showDeleteConfirm function and center the Empty of knowledge list and extract the text of the login page to en.json (#203)

feat: remove showDeleteConfirm function
feat: center the Empty of knowledge list
feat: extract the text of the login page to en.json
#204
This commit is contained in:
balibabu
2024-04-02 15:44:09 +08:00
committed by GitHub
parent f89c6c9d59
commit 2673be8bc1
16 changed files with 134 additions and 97 deletions

View File

@ -6,22 +6,22 @@ import { Button, Empty, Flex, Space, Spin } from 'antd';
import KnowledgeCard from './knowledge-card';
import KnowledgeCreatingModal from './knowledge-creating-modal';
import { useTranslation } from 'react-i18next';
import styles from './index.less';
const Knowledge = () => {
const { list, loading } = useFetchKnowledgeList();
const userInfo = useSelectUserInfo();
const { t } = useTranslation('translation', { keyPrefix: 'knowledgeList' });
return (
<Flex className={styles.knowledge} vertical flex={1}>
<div className={styles.topWrapper}>
<div>
<span className={styles.title}>
Welcome back, {userInfo.nickname}
{t('welcome')}, {userInfo.nickname}
</span>
<p className={styles.description}>
Which database are we going to use today?
</p>
<p className={styles.description}>{t('description')}</p>
</div>
<Space size={'large'}>
{/* <Button icon={<FilterIcon />} className={styles.filterButton}>
@ -38,7 +38,7 @@ const Knowledge = () => {
}}
className={styles.topButton}
>
Create knowledge base
{t('createKnowledgeBase')}
</Button>
<KnowledgeCreatingModal
visible={visible}
@ -62,7 +62,7 @@ const Knowledge = () => {
);
})
) : (
<Empty></Empty>
<Empty className={styles.knowledgeEmpty}></Empty>
)}
</Flex>
</Spin>