Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions space/components/issues/board-views/kanban/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ export const IssueListBlock = observer(({ issue }: { issue: IIssue }) => {

const handleBlockClick = () => {
issueDetailStore.setPeekId(issue.id);
router.replace(
`/[workspace_slug]/[project_slug]`,
router.push(
{
pathname: `/${workspace_slug?.toString()}/${project_slug}`,
query: {
board: board?.toString(),
peekId: issue.id,
},
},
undefined,
{ shallow: true }
);
// router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`);
};

return (
Expand Down
4 changes: 2 additions & 2 deletions space/components/issues/board-views/list/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export const IssueListBlock: FC<{ issue: IIssue }> = observer((props) => {

const handleBlockClick = () => {
issueDetailStore.setPeekId(issue.id);
router.replace(
`/[workspace_slug]/[project_slug]`,
router.push(
{
pathname: `/${workspace_slug?.toString()}/${project_slug}`,
query: {
board: board?.toString(),
peekId: issue.id,
},
},
undefined,
{ shallow: true }
);
// router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`);
Expand Down
18 changes: 11 additions & 7 deletions space/components/issues/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,19 @@ const IssueNavbar = observer(() => {
}, [projectStore, workspace_slug, project_slug]);

useEffect(() => {
if (workspace_slug && projectStore) {
if (board) {
projectStore.setActiveBoard(board.toString());
} else {
router.push(`/${workspace_slug}/${project_slug}?board=list`);
projectStore.setActiveBoard("list");
if (workspace_slug && project_slug) {
if (!board) {
router.push({
pathname: `/${workspace_slug}/${project_slug}`,
query: {
board: "list",
},
});
return projectStore.setActiveBoard("list");
}
projectStore.setActiveBoard(board.toString());
}
}, [board, router, projectStore, workspace_slug, project_slug]);
}, [board, workspace_slug, project_slug]);

return (
<div className="px-5 relative w-full flex items-center gap-4">
Expand Down
16 changes: 1 addition & 15 deletions space/components/issues/navbar/issue-board-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,7 @@ export const NavbarIssueBoardView = observer(() => {

const handleCurrentBoardView = (boardView: string) => {
projectStore.setActiveBoard(boardView);
router.push(
`/${workspace_slug}/${project_slug}?board=${boardView}${
issueStore?.filteredLabels && issueStore?.filteredLabels.length > 0
? `&labels=${issueStore?.filteredLabels.join(",")}`
: ""
}${
issueStore?.filteredPriorities && issueStore?.filteredPriorities.length > 0
? `&priorities=${issueStore?.filteredPriorities.join(",")}`
: ""
}${
issueStore?.filteredStates && issueStore?.filteredStates.length > 0
? `&states=${issueStore?.filteredStates.join(",")}`
: ""
}`
);
router.push(`/${workspace_slug}/${project_slug}?board=${boardView}`);
};

return (
Expand Down