π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix: showing first issue as default inbox state (#5147)
Akshita Goyal996192b9bf15
diff --git a/web/core/components/inbox/sidebar/root.tsx b/web/core/components/inbox/sidebar/root.tsxindex e874d0c4b6..069fe93646 100644--- a/web/core/components/inbox/sidebar/root.tsx+++ b/web/core/components/inbox/sidebar/root.tsx@@ -1,7 +1,8 @@"use client";-import { FC, useCallback, useRef, useState } from "react";+import { FC, useCallback, useEffect, useRef, useState } from "react";import { observer } from "mobx-react";+import { useParams } from "next/navigation";import { TInboxIssueCurrentTab } from "@plane/types";import { Loader } from "@plane/ui";// components@@ -53,6 +54,7 @@ export const InboxSidebar: FC<IInboxSidebarProps> = observer((props) => {} = useProjectInbox();const router = useAppRouter();+ const { inboxIssueId } = useParams();const fetchNextPages = useCallback(() => {if (!workspaceSlug || !projectId) return;@@ -62,6 +64,13 @@ export const InboxSidebar: FC<IInboxSidebarProps> = observer((props) => {// page observeruseIntersectionObserver(containerRef, elementRef, fetchNextPages, "20%");+ useEffect(() => {+ if (inboxIssueId) return;+ router.push(+ `/${workspaceSlug}/projects/${projectId}/inbox?currentTab=${currentTab}&inboxIssueId=${filteredInboxIssueIds[0]}`+ );+ }, [filteredInboxIssueIds, currentTab, workspaceSlug, projectId, router, inboxIssueId]);+return (<div className="bg-custom-background-100 flex-shrink-0 w-full h-full border-r border-custom-border-300 "><div className="relative w-full h-full flex flex-col overflow-hidden">