diff --git a/web/core/components/home/widgets/recents/issue.tsx b/web/core/components/home/widgets/recents/issue.tsx index af08942818b..0c3f9ac6a1b 100644 --- a/web/core/components/home/widgets/recents/issue.tsx +++ b/web/core/components/home/widgets/recents/issue.tsx @@ -24,12 +24,16 @@ export const RecentIssue = (props: BlockProps) => { const { setPeekIssue } = useIssueDetail(); // derived values const issueDetails: TIssueEntityData = activity.entity_data as TIssueEntityData; + + if (!issueDetails) return <>; + const state = getStateById(issueDetails?.state); + const workItemLink = `/${workspaceSlug}/projects/${issueDetails?.project_id}/issues/${issueDetails.id}`; return ( diff --git a/web/core/components/home/widgets/recents/page.tsx b/web/core/components/home/widgets/recents/page.tsx index 95f78737ae8..532831d3229 100644 --- a/web/core/components/home/widgets/recents/page.tsx +++ b/web/core/components/home/widgets/recents/page.tsx @@ -28,6 +28,9 @@ export const RecentPage = (props: BlockProps) => { const { getUserDetails } = useMember(); // derived values const pageDetails = activity.entity_data as TPageEntityData; + + if (!pageDetails) return <>; + const ownerDetails = getUserDetails(pageDetails?.owned_by); const pageLink = pageDetails.project_id ? `/${workspaceSlug}/projects/${pageDetails.project_id}/pages/${pageDetails.id}` @@ -36,7 +39,7 @@ export const RecentPage = (props: BlockProps) => { return ( diff --git a/web/core/components/home/widgets/recents/project.tsx b/web/core/components/home/widgets/recents/project.tsx index 1663b6bf474..9321a017f4e 100644 --- a/web/core/components/home/widgets/recents/project.tsx +++ b/web/core/components/home/widgets/recents/project.tsx @@ -21,10 +21,14 @@ export const RecentProject = (props: BlockProps) => { // derived values const projectDetails: TProjectEntityData = activity.entity_data as TProjectEntityData; + if (!projectDetails) return <>; + + const projectLink = `/${workspaceSlug}/projects/${projectDetails?.id}/issues`; + return ( @@ -69,7 +73,7 @@ export const RecentProject = (props: BlockProps) => { onItemClick={(e) => { e.preventDefault(); e.stopPropagation(); - router.push(`/${workspaceSlug}/projects/${projectDetails?.id}/issues`); + router.push(projectLink); }} /> );