@@ -6,20 +6,18 @@ import { useRouter } from "next/navigation";
66// plane package imports
77import { EUserPermissions , EUserPermissionsLevel , PROJECT_TRACKER_ELEMENTS } from "@plane/constants" ;
88import { useTranslation } from "@plane/i18n" ;
9+ import { EmptyStateDetailed } from "@plane/propel/empty-state" ;
910import { Tabs } from "@plane/ui" ;
1011import type { TabItem } from "@plane/ui" ;
1112// components
1213import AnalyticsFilterActions from "@/components/analytics/analytics-filter-actions" ;
1314import { PageHead } from "@/components/core/page-title" ;
14- import { ComicBoxButton } from "@/components/empty-state/comic-box-button" ;
15- import { DetailedEmptyState } from "@/components/empty-state/detailed-empty-state-root" ;
1615// hooks
1716import { captureClick } from "@/helpers/event-tracker.helper" ;
1817import { useCommandPalette } from "@/hooks/store/use-command-palette" ;
1918import { useProject } from "@/hooks/store/use-project" ;
2019import { useWorkspace } from "@/hooks/store/use-workspace" ;
2120import { useUserPermissions } from "@/hooks/store/user" ;
22- import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path" ;
2321import { getAnalyticsTabs } from "@/plane-web/components/analytics/tabs" ;
2422
2523type Props = {
@@ -46,9 +44,6 @@ const AnalyticsPage = observer((props: Props) => {
4644 const { currentWorkspace } = useWorkspace ( ) ;
4745 const { allowPermissions } = useUserPermissions ( ) ;
4846
49- // helper hooks
50- const resolvedPath = useResolvedAssetPath ( { basePath : "/empty-state/onboarding/analytics" } ) ;
51-
5247 // permissions
5348 const canPerformEmptyStateActions = allowPermissions (
5449 [ EUserPermissions . ADMIN , EUserPermissions . MEMBER ] ,
@@ -96,22 +91,20 @@ const AnalyticsPage = observer((props: Props) => {
9691 />
9792 </ div >
9893 ) : (
99- < DetailedEmptyState
100- title = { t ( "workspace_analytics.empty_state.general.title" ) }
101- description = { t ( "workspace_analytics.empty_state.general.description" ) }
102- assetPath = { resolvedPath }
103- customPrimaryButton = {
104- < ComicBoxButton
105- label = { t ( "workspace_analytics.empty_state.general.primary_button.text" ) }
106- title = { t ( "workspace_analytics.empty_state.general.primary_button.comic.title" ) }
107- description = { t ( "workspace_analytics.empty_state.general.primary_button.comic.description" ) }
108- onClick = { ( ) => {
94+ < EmptyStateDetailed
95+ assetKey = "project"
96+ title = { t ( "workspace_projects.empty_state.no_projects.title" ) }
97+ description = { t ( "workspace_projects.empty_state.no_projects.description" ) }
98+ actions = { [
99+ {
100+ label : "Create a project" ,
101+ onClick : ( ) => {
109102 toggleCreateProjectModal ( true ) ;
110103 captureClick ( { elementName : PROJECT_TRACKER_ELEMENTS . EMPTY_STATE_CREATE_PROJECT_BUTTON } ) ;
111- } }
112- disabled = { ! canPerformEmptyStateActions }
113- />
114- }
104+ } ,
105+ disabled : ! canPerformEmptyStateActions ,
106+ } ,
107+ ] }
115108 />
116109 ) }
117110 </ >
0 commit comments