From b016ed78cfd481dee3ee66fe1d2cce3e2ee26f6a Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:23:15 +0530 Subject: [PATCH] [PE-248] regression: recent widgets refactor for scalability (#6456) * fix: recent widgets types and filters * fix: recent widgets types --- packages/types/src/home.d.ts | 4 ++-- web/core/components/home/widgets/recents/index.tsx | 1 - web/core/components/home/widgets/recents/page.tsx | 8 +++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/types/src/home.d.ts b/packages/types/src/home.d.ts index 68fcd4d1d..56089bf46 100644 --- a/packages/types/src/home.d.ts +++ b/packages/types/src/home.d.ts @@ -12,9 +12,9 @@ export type TPageEntityData = { id: string; name: string; logo_props: TLogoProps; - project_id: string; + project_id?: string; owned_by: string; - project_identifier: string; + project_identifier?: string; }; export type TProjectEntityData = { diff --git a/web/core/components/home/widgets/recents/index.tsx b/web/core/components/home/widgets/recents/index.tsx index 02d3ae38d..8530563de 100644 --- a/web/core/components/home/widgets/recents/index.tsx +++ b/web/core/components/home/widgets/recents/index.tsx @@ -24,7 +24,6 @@ const filters: { name: TRecentActivityFilterKeys; icon?: React.ReactNode }[] = [ { name: "all item" }, { name: "issue", icon: }, { name: "page", icon: }, - { name: "workspace_page", icon: }, { name: "project", icon: }, ]; diff --git a/web/core/components/home/widgets/recents/page.tsx b/web/core/components/home/widgets/recents/page.tsx index 8cff40588..125c424c1 100644 --- a/web/core/components/home/widgets/recents/page.tsx +++ b/web/core/components/home/widgets/recents/page.tsx @@ -49,9 +49,11 @@ export const RecentPage = (props: BlockProps) => { )} -
- {pageDetails?.project_identifier} -
+ {pageDetails?.project_identifier && ( +
+ {pageDetails?.project_identifier} +
+ )}
{pageDetails?.name}
{calculateTimeAgo(activity.visited_at)}