diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx index 7bb716733..efbbd9b1d 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx @@ -24,11 +24,20 @@ function DashboardList() { show={lenth === 0} title={
- -
- {dashboardsSearch !== '' - ? 'No matching results' - : "You haven't created any dashboards yet"} +
+ {dashboardsSearch !== '' ? ( + 'No matching results' + ) : ( +
+
Create your first Dashboard
+
+ A dashboard lets you visualize trends and insights of data captured by OpenReplay. +
+
+ )} +
+
+
} diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx index 7378e88f8..d54b34dc3 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardsView.tsx @@ -3,43 +3,57 @@ import { Button, PageTitle, Icon } from 'UI'; import withPageTitle from 'HOCs/withPageTitle'; import { useStore } from 'App/mstore'; import { withSiteId } from 'App/routes'; - +import Select from 'Shared/Select'; import DashboardList from './DashboardList'; import DashboardSearch from './DashboardSearch'; +import { sort } from 'App/duck/sessions'; +import { useObserver } from 'mobx-react-lite'; -function DashboardsView({ history, siteId }: { history: any, siteId: string }) { - const { dashboardStore } = useStore(); +function DashboardsView({ history, siteId }: { history: any; siteId: string }) { + const { dashboardStore } = useStore(); + const sort = useObserver(() => dashboardStore.sort); - const onAddDashboardClick = () => { - dashboardStore.initDashboard(); - dashboardStore - .save(dashboardStore.dashboardInstance) - .then(async (syncedDashboard) => { - dashboardStore.selectDashboardById(syncedDashboard.dashboardId); - history.push(withSiteId(`/dashboard/${syncedDashboard.dashboardId}`, siteId)) - }) - } + const onAddDashboardClick = () => { + dashboardStore.initDashboard(); + dashboardStore.save(dashboardStore.dashboardInstance).then(async (syncedDashboard) => { + dashboardStore.selectDashboardById(syncedDashboard.dashboardId); + history.push(withSiteId(`/dashboard/${syncedDashboard.dashboardId}`, siteId)); + }); + }; - return ( -
-
-
- -
-
- -
- -
-
-
-
- - A Dashboard is a collection of Metrics that can be shared across teams. -
- + return ( +
+
+
+
- ); +
+ +
+