Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: empty state error handling added and page empty state key updated (#3915)

Anmol Singh Bhatiacc069b61aa72
diff --git a/web/components/empty-state/empty-state.tsx b/web/components/empty-state/empty-state.tsx
index 9ef216068c..a9ff4decdd 100644
--- a/web/components/empty-state/empty-state.tsx
+++ b/web/components/empty-state/empty-state.tsx
@@ -39,6 +39,10 @@ export const EmptyState: React.FC<EmptyStateProps> = (props) => {
} = useUser();
// theme
const { resolvedTheme } = useTheme();
+
+ // if empty state type is not found
+ if (!EMPTY_STATE_DETAILS[type]) return null;
+
// current empty state details
const { key, title, description, path, primaryButton, secondaryButton, accessType, access } =
EMPTY_STATE_DETAILS[type];
diff --git a/web/constants/empty-state.ts b/web/constants/empty-state.ts
index 38f334b201..3e72ef5a63 100644
--- a/web/constants/empty-state.ts
+++ b/web/constants/empty-state.ts
@@ -69,7 +69,7 @@ export enum EmptyStateType {
PROJECT_VIEW = "project-view",
PROJECT_PAGE = "project-page",
PROJECT_PAGE_ALL = "project-page-all",
- PROJECT_PAGE_FAVORITE = "project-page-favorite",
+ PROJECT_PAGE_FAVORITE = "project-page-favorites",
PROJECT_PAGE_PRIVATE = "project-page-private",
PROJECT_PAGE_SHARED = "project-page-shared",
PROJECT_PAGE_ARCHIVED = "project-page-archived",
@@ -475,8 +475,8 @@ const emptyStateDetails = {
"Pages help you organise your thoughts to create wikis, discussions or even document heated takes for your project. Use it wisely!",
path: "/empty-state/pages/all",
},
- "project-page-favorite": {
- key: "project-page-favorite",
+ "project-page-favorites": {
+ key: "project-page-favorites",
title: "No favorite pages yet",
description: "Favorites for quick access? mark them and find them right here.",
path: "/empty-state/pages/favorites",