tianji/src/client/pages/Dashboard.tsx

32 lines
827 B
TypeScript
Raw Normal View History

2023-08-31 16:11:47 +00:00
import React from 'react';
2023-09-01 16:52:43 +00:00
import { EditOutlined } from '@ant-design/icons';
import { Button } from 'antd';
import { WebsiteOverview } from '../components/WebsiteOverview';
import { useCurrentWorkspaceId } from '../store/user';
import { Loading } from '../components/Loading';
2023-08-31 16:11:47 +00:00
export const Dashboard: React.FC = React.memo(() => {
const workspaceId = useCurrentWorkspaceId();
if (!workspaceId) {
return <Loading />;
}
2023-09-01 16:52:43 +00:00
return (
<div>
<div className="h-24 flex items-center">
<div className="text-2xl flex-1">Dashboard</div>
<div>
<Button icon={<EditOutlined />} size="large">
Edit
</Button>
</div>
</div>
<div>
<WebsiteOverview workspaceId={workspaceId} />
2023-09-01 16:52:43 +00:00
</div>
</div>
);
2023-08-31 16:11:47 +00:00
});
Dashboard.displayName = 'Dashboard';