Skip to content

Commit 547d961

Browse files
feat: add empty state UI for service list
1 parent a2ee27a commit 547d961

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/locales/en/common.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@
329329
"singular": "Secret"
330330
},
331331
"services": {
332-
"singular": "Service"
332+
"singular": "Service",
333+
"empty": "No services found. Click Add Service to create your first one."
334+
333335
},
334336
"settings": {
335337
"adminKey": "Admin Key",

src/routes/services/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import type { ProColumns } from '@ant-design/pro-components';
1818
import { ProTable } from '@ant-design/pro-components';
1919
import { createFileRoute } from '@tanstack/react-router';
20+
import { Empty } from 'antd';
2021
import { useMemo } from 'react';
2122
import { useTranslation } from 'react-i18next';
2223

@@ -91,6 +92,15 @@ const ServiceList = () => {
9192
return (
9293
<AntdConfigProvider>
9394
<ProTable
95+
locale={{
96+
emptyText: (
97+
<Empty
98+
description={t('services.empty')}
99+
image={Empty.PRESENTED_IMAGE_SIMPLE}
100+
/>
101+
),
102+
}}
103+
94104
columns={columns}
95105
dataSource={data.list}
96106
rowKey="id"

0 commit comments

Comments
 (0)