+
@@ -120,11 +98,7 @@ const WebsiteOverviewItem: React.FC<{
-
+
{props.actions}
@@ -147,7 +121,7 @@ const WebsiteOverviewItem: React.FC<{
);
});
-WebsiteOverviewItem.displayName = 'WebsiteOverviewItem';
+WebsiteOverview.displayName = 'WebsiteOverview';
export const MetricsBar: React.FC<{
stats: {
diff --git a/src/client/pages/Dashboard.tsx b/src/client/pages/Dashboard.tsx
index 3ba9511..92ddb76 100644
--- a/src/client/pages/Dashboard.tsx
+++ b/src/client/pages/Dashboard.tsx
@@ -1,14 +1,23 @@
-import React from 'react';
-import { EditOutlined } from '@ant-design/icons';
-import { Button } from 'antd';
+import React, { Fragment } from 'react';
+import { ArrowRightOutlined, EditOutlined } from '@ant-design/icons';
+import { Button, Divider } from 'antd';
import { WebsiteOverview } from '../components/WebsiteOverview';
import { useCurrentWorkspaceId } from '../store/user';
import { Loading } from '../components/Loading';
+import { useWorspaceWebsites } from '../api/model/website';
+import { NoWorkspaceTip } from '../components/NoWorkspaceTip';
+import { useNavigate } from 'react-router';
export const Dashboard: React.FC = React.memo(() => {
- const workspaceId = useCurrentWorkspaceId();
+ const workspaceId = useCurrentWorkspaceId()!;
+ const { isLoading, websites } = useWorspaceWebsites(workspaceId);
+ const navigate = useNavigate();
if (!workspaceId) {
+ return
;
+ }
+
+ if (isLoading) {
return
;
}
@@ -23,7 +32,28 @@ export const Dashboard: React.FC = React.memo(() => {