forked from github/plane
fix: space redirections (#2069)
This commit is contained in:
parent
4ea52302ba
commit
d3a9a764dc
@ -23,8 +23,7 @@ export const IssueListBlock = observer(({ issue }: { issue: IIssue }) => {
|
|||||||
|
|
||||||
const handleBlockClick = () => {
|
const handleBlockClick = () => {
|
||||||
issueDetailStore.setPeekId(issue.id);
|
issueDetailStore.setPeekId(issue.id);
|
||||||
router.replace(
|
router.push(
|
||||||
`/[workspace_slug]/[project_slug]`,
|
|
||||||
{
|
{
|
||||||
pathname: `/${workspace_slug?.toString()}/${project_slug}`,
|
pathname: `/${workspace_slug?.toString()}/${project_slug}`,
|
||||||
query: {
|
query: {
|
||||||
@ -32,9 +31,9 @@ export const IssueListBlock = observer(({ issue }: { issue: IIssue }) => {
|
|||||||
peekId: issue.id,
|
peekId: issue.id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
undefined,
|
||||||
{ shallow: true }
|
{ shallow: true }
|
||||||
);
|
);
|
||||||
// router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -26,8 +26,7 @@ export const IssueListBlock: FC<{ issue: IIssue }> = observer((props) => {
|
|||||||
|
|
||||||
const handleBlockClick = () => {
|
const handleBlockClick = () => {
|
||||||
issueDetailStore.setPeekId(issue.id);
|
issueDetailStore.setPeekId(issue.id);
|
||||||
router.replace(
|
router.push(
|
||||||
`/[workspace_slug]/[project_slug]`,
|
|
||||||
{
|
{
|
||||||
pathname: `/${workspace_slug?.toString()}/${project_slug}`,
|
pathname: `/${workspace_slug?.toString()}/${project_slug}`,
|
||||||
query: {
|
query: {
|
||||||
@ -35,6 +34,7 @@ export const IssueListBlock: FC<{ issue: IIssue }> = observer((props) => {
|
|||||||
peekId: issue.id,
|
peekId: issue.id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
undefined,
|
||||||
{ shallow: true }
|
{ shallow: true }
|
||||||
);
|
);
|
||||||
// router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`);
|
// router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`);
|
||||||
|
@ -44,15 +44,19 @@ const IssueNavbar = observer(() => {
|
|||||||
}, [projectStore, workspace_slug, project_slug]);
|
}, [projectStore, workspace_slug, project_slug]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (workspace_slug && projectStore) {
|
if (workspace_slug && project_slug) {
|
||||||
if (board) {
|
if (!board) {
|
||||||
projectStore.setActiveBoard(board.toString());
|
router.push({
|
||||||
} else {
|
pathname: `/${workspace_slug}/${project_slug}`,
|
||||||
router.push(`/${workspace_slug}/${project_slug}?board=list`);
|
query: {
|
||||||
projectStore.setActiveBoard("list");
|
board: "list",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return projectStore.setActiveBoard("list");
|
||||||
}
|
}
|
||||||
|
projectStore.setActiveBoard(board.toString());
|
||||||
}
|
}
|
||||||
}, [board, router, projectStore, workspace_slug, project_slug]);
|
}, [board, workspace_slug, project_slug]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="px-5 relative w-full flex items-center gap-4">
|
<div className="px-5 relative w-full flex items-center gap-4">
|
||||||
|
@ -14,21 +14,7 @@ export const NavbarIssueBoardView = observer(() => {
|
|||||||
|
|
||||||
const handleCurrentBoardView = (boardView: string) => {
|
const handleCurrentBoardView = (boardView: string) => {
|
||||||
projectStore.setActiveBoard(boardView);
|
projectStore.setActiveBoard(boardView);
|
||||||
router.push(
|
router.push(`/${workspace_slug}/${project_slug}?board=${boardView}`);
|
||||||
`/${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(",")}`
|
|
||||||
: ""
|
|
||||||
}`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user