Files
AFFiNE-Mirror/packages/app/src/components/page-list/Empty.tsx
2023-02-06 20:13:39 +08:00

22 lines
642 B
TypeScript

import React from 'react';
import { Empty } from '@/ui/empty';
import { useTranslation } from '@affine/i18n';
export const PageListEmpty = (props: { listType?: string }) => {
const { listType } = props;
const { t } = useTranslation();
return (
<div style={{ textAlign: 'center' }}>
<Empty
width={800}
height={300}
sx={{ marginTop: '100px', marginBottom: '30px' }}
/>
{listType === 'all' && <p>{t('emptyAllPages')}</p>}
{listType === 'favorite' && <p>{t('emptyFavourite')}</p>}
{listType === 'trash' && <p>{t('emptyTrash')}</p>}
</div>
);
};
export default PageListEmpty;