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';
|
2023-09-10 07:55:04 +00:00
|
|
|
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(() => {
|
2023-09-10 07:55:04 +00:00
|
|
|
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>
|
2023-09-10 07:55:04 +00:00
|
|
|
<WebsiteOverview workspaceId={workspaceId} />
|
2023-09-01 16:52:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2023-08-31 16:11:47 +00:00
|
|
|
});
|
|
|
|
Dashboard.displayName = 'Dashboard';
|