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 modules and cycle peek views (#5261)

rahulrameshaf2af5f065311
diff --git a/web/core/components/cycles/board/cycles-board-card.tsx b/web/core/components/cycles/board/cycles-board-card.tsx
index e14f63a950..5c77305606 100644
--- a/web/core/components/cycles/board/cycles-board-card.tsx
+++ b/web/core/components/cycles/board/cycles-board-card.tsx
@@ -139,7 +139,7 @@ export const CyclesBoardCard: FC<ICyclesBoardCard> = observer((props) => {
e.stopPropagation();
const query = generateQueryParams(searchParams, ["peekCycle"]);
- if (searchParams.has("peekCycle")) {
+ if (searchParams.has("peekCycle") && searchParams.get("peekCycle") === cycleId) {
router.push(`${pathname}?${query}`);
} else {
router.push(`${pathname}?${query && `${query}&`}peekCycle=${cycleId}`);
diff --git a/web/core/components/cycles/list/cycles-list-item.tsx b/web/core/components/cycles/list/cycles-list-item.tsx
index 7b93acbca2..67983829a3 100644
--- a/web/core/components/cycles/list/cycles-list-item.tsx
+++ b/web/core/components/cycles/list/cycles-list-item.tsx
@@ -70,7 +70,7 @@ export const CyclesListItem: FC<TCyclesListItem> = observer((props) => {
e.stopPropagation();
const query = generateQueryParams(searchParams, ["peekCycle"]);
- if (searchParams.has("peekCycle")) {
+ if (searchParams.has("peekCycle") && searchParams.get("peekCycle") === cycleId) {
router.push(`${pathname}?${query}`);
} else {
router.push(`${pathname}?${query && `${query}&`}peekCycle=${cycleId}`);
diff --git a/web/core/components/modules/module-card-item.tsx b/web/core/components/modules/module-card-item.tsx
index cda9c73810..d8518f21a6 100644
--- a/web/core/components/modules/module-card-item.tsx
+++ b/web/core/components/modules/module-card-item.tsx
@@ -113,7 +113,7 @@ export const ModuleCardItem: React.FC<Props> = observer((props) => {
e.preventDefault();
const query = generateQueryParams(searchParams, ["peekModule"]);
- if (searchParams.has("peekModule")) {
+ if (searchParams.has("peekModule") && searchParams.get("peekModule") === moduleId) {
router.push(`${pathname}?${query}`);
} else {
router.push(`${pathname}?${query && `${query}&`}peekModule=${moduleId}`);
diff --git a/web/core/components/modules/module-list-item.tsx b/web/core/components/modules/module-list-item.tsx
index 88d4d0141f..8eb1f5b98a 100644
--- a/web/core/components/modules/module-list-item.tsx
+++ b/web/core/components/modules/module-list-item.tsx
@@ -67,7 +67,7 @@ export const ModuleListItem: React.FC<Props> = observer((props) => {
e.preventDefault();
const query = generateQueryParams(searchParams, ["peekModule"]);
- if (searchParams.has("peekModule")) {
+ if (searchParams.has("peekModule") && searchParams.get("peekModule") === moduleId) {
router.push(`${pathname}?${query}`);
} else {
router.push(`${pathname}?${query && `${query}&`}peekModule=${moduleId}`);