refactor: add audit log list empty state

This commit is contained in:
moonrailgun 2024-01-29 19:01:50 +08:00
parent 99a6c91b1b
commit f153145e0d

View File

@ -1,4 +1,4 @@
import { Card, List } from 'antd'; import { Card, Empty, List } from 'antd';
import React, { useMemo, useRef } from 'react'; import React, { useMemo, useRef } from 'react';
import { useCurrentWorkspaceId } from '../../store/user'; import { useCurrentWorkspaceId } from '../../store/user';
import { PageHeader } from '../../components/PageHeader'; import { PageHeader } from '../../components/PageHeader';
@ -58,6 +58,8 @@ export const AuditLog: React.FC = React.memo(() => {
<Card> <Card>
<List> <List>
<div ref={parentRef} className="h-[560px] overflow-auto w-full"> <div ref={parentRef} className="h-[560px] overflow-auto w-full">
{virtualItems.length === 0 && <Empty />}
<div <div
className="relative w-full" className="relative w-full"
style={{ style={{