mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 16:19:43 +01:00
fix: home recent n progress (#6648)
This commit is contained in:
committed by
GitHub
parent
376f781052
commit
3de655cbd4
@@ -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>}
|
||||
|
||||
@@ -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
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user