fix: home recent n progress (#6648)

This commit is contained in:
Anmol Singh Bhatia
2025-02-19 18:04:26 +05:30
committed by GitHub
parent 376f781052
commit 3de655cbd4
2 changed files with 9 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import { cn } from "@/helpers/common.helper";
import { useAppRouter } from "@/hooks/use-app-router";
interface IListItemProps {
id?: string;
title: string;
itemLink: string;
onItemClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
@@ -22,10 +23,12 @@ interface IListItemProps {
actionItemContainerClassName?: string;
isSidebarOpen?: boolean;
quickActionElement?: JSX.Element;
preventDefaultNProgress?: boolean;
}
export const ListItem: FC<IListItemProps> = (props) => {
const {
id,
title,
prependTitleElement,
appendTitleElement,
@@ -40,6 +43,7 @@ export const ListItem: FC<IListItemProps> = (props) => {
isSidebarOpen = false,
quickActionElement,
itemClassName = "",
preventDefaultNProgress = false,
} = props;
// router
@@ -56,20 +60,19 @@ export const ListItem: FC<IListItemProps> = (props) => {
<Row
className={cn(
"group min-h-[52px] flex w-full flex-col items-center justify-between gap-3 py-4 text-sm border-b border-custom-border-200 bg-custom-background-100 hover:bg-custom-background-90 ",
{
"xl:gap-5 xl:py-0 xl:flex-row": isSidebarOpen,
"lg:gap-5 lg:py-0 lg:flex-row": !isSidebarOpen,
},
{ "xl:gap-5 xl:py-0 xl:flex-row": isSidebarOpen, "lg:gap-5 lg:py-0 lg:flex-row": !isSidebarOpen },
className
)}
>
<div className={cn("relative flex w-full items-center justify-between gap-3 overflow-hidden", itemClassName)}>
<ControlLink
id={id}
className="relative flex w-full items-center gap-3 overflow-hidden"
href={itemLink}
target="_self"
onClick={handleControlLinkClick}
disabled={disableLink}
data-prevent-nprogress={preventDefaultNProgress}
>
<div className="flex items-center gap-4 truncate">
{prependTitleElement && <span className="flex items-center flex-shrink-0">{prependTitleElement}</span>}

View File

@@ -43,6 +43,7 @@ export const RecentIssue = (props: BlockProps) => {
return (
<ListItem
key={activity.id}
id={`issue-${issueDetails?.id}`}
itemLink={workItemLink}
title={issueDetails?.name}
prependTitleElement={
@@ -113,6 +114,7 @@ export const RecentIssue = (props: BlockProps) => {
e.stopPropagation();
setPeekIssue({ workspaceSlug, projectId: issueDetails?.project_id, issueId: activity.entity_data.id });
}}
preventDefaultNProgress
/>
);
};