fix: issue redirection (#1733)

This commit is contained in:
Aaryan Khandelwal 2023-08-01 11:22:47 +05:30 committed by GitHub
parent 7287c27b73
commit df8504e6f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -221,7 +221,7 @@ export const SingleBoardIssue: React.FC<Props> = ({
Copy issue link Copy issue link
</ContextMenu.Item> </ContextMenu.Item>
<a <a
href={`/${workspaceSlug}/projects/${projectId}/issues/${issue.id}`} href={`/${workspaceSlug}/projects/${issue.project}/issues/${issue.id}`}
target="_blank" target="_blank"
rel="noreferrer noopener" rel="noreferrer noopener"
> >

View File

@ -192,7 +192,7 @@ export const SingleCalendarIssue: React.FC<Props> = ({
</CustomMenu> </CustomMenu>
</div> </div>
)} )}
<Link href={`/${workspaceSlug}/projects/${issue?.project_detail.id}/issues/${issue.id}`}> <Link href={`/${workspaceSlug}/projects/${issue.project}/issues/${issue.id}`}>
<a className="flex w-full cursor-pointer flex-col items-start justify-center gap-1.5"> <a className="flex w-full cursor-pointer flex-col items-start justify-center gap-1.5">
{properties.key && ( {properties.key && (
<Tooltip <Tooltip

View File

@ -156,9 +156,9 @@ export const SingleListIssue: React.FC<Props> = ({
}); });
}; };
const singleIssuePath = isArchivedIssues const issuePath = isArchivedIssues
? `/${workspaceSlug}/projects/${projectId}/archived-issues/${issue.id}` ? `/${workspaceSlug}/projects/${issue.project}/archived-issues/${issue.id}`
: `/${workspaceSlug}/projects/${projectId}/issues/${issue.id}`; : `/${workspaceSlug}/projects/${issue.project}/issues/${issue.id}`;
const isNotAllowed = const isNotAllowed =
userAuth.isGuest || userAuth.isViewer || disableUserActions || isArchivedIssues; userAuth.isGuest || userAuth.isViewer || disableUserActions || isArchivedIssues;
@ -187,7 +187,7 @@ export const SingleListIssue: React.FC<Props> = ({
<ContextMenu.Item Icon={LinkIcon} onClick={handleCopyText}> <ContextMenu.Item Icon={LinkIcon} onClick={handleCopyText}>
Copy issue link Copy issue link
</ContextMenu.Item> </ContextMenu.Item>
<a href={singleIssuePath} target="_blank" rel="noreferrer noopener"> <a href={issuePath} target="_blank" rel="noreferrer noopener">
<ContextMenu.Item Icon={ArrowTopRightOnSquareIcon}> <ContextMenu.Item Icon={ArrowTopRightOnSquareIcon}>
Open issue in new tab Open issue in new tab
</ContextMenu.Item> </ContextMenu.Item>
@ -202,7 +202,7 @@ export const SingleListIssue: React.FC<Props> = ({
}} }}
> >
<div className="flex-grow cursor-pointer min-w-[200px] whitespace-nowrap overflow-hidden overflow-ellipsis"> <div className="flex-grow cursor-pointer min-w-[200px] whitespace-nowrap overflow-hidden overflow-ellipsis">
<Link href={singleIssuePath}> <Link href={issuePath}>
<a className="group relative flex items-center gap-2"> <a className="group relative flex items-center gap-2">
{properties.key && ( {properties.key && (
<Tooltip <Tooltip

View File

@ -263,7 +263,7 @@ export const SingleSpreadsheetIssue: React.FC<Props> = ({
)} )}
</div> </div>
<Link href={`/${workspaceSlug}/projects/${issue?.project_detail?.id}/issues/${issue.id}`}> <Link href={`/${workspaceSlug}/projects/${issue.project}/issues/${issue.id}`}>
<a className="truncate text-custom-text-100 cursor-pointer w-full text-[0.825rem]"> <a className="truncate text-custom-text-100 cursor-pointer w-full text-[0.825rem]">
{issue.name} {issue.name}
</a> </a>