* fix: remove unused imports and variables (part 1) Resolve oxlint no-unused-vars warnings in packages/*, apps/admin, apps/space, apps/live, and apps/web (non-core). * fix: resolve CI check failures * fix: resolve check:types failures * fix: resolve check:types and check:format failures - Use destructuring alias for activeCycleResolvedPath - Format propel tab-navigation file * fix: format propel button helper with oxfmt Reorder Tailwind classes to match oxfmt canonical ordering.
41 lines
1,012 B
TypeScript
41 lines
1,012 B
TypeScript
/**
|
|
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
* See the LICENSE file for details.
|
|
*/
|
|
|
|
import Link from "next/link";
|
|
// hooks
|
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
|
|
|
type TIssueUser = {
|
|
activityId: string;
|
|
customUserName?: string;
|
|
};
|
|
|
|
export function IssueCreatorDisplay(props: TIssueUser) {
|
|
const { activityId, customUserName } = props;
|
|
// hooks
|
|
const {
|
|
activity: { getActivityById },
|
|
} = useIssueDetail();
|
|
|
|
const activity = getActivityById(activityId);
|
|
|
|
if (!activity) return <></>;
|
|
|
|
return (
|
|
<>
|
|
{customUserName ? (
|
|
<span className="font-medium text-primary">{customUserName || "Plane"}</span>
|
|
) : (
|
|
<Link
|
|
href={`/${activity?.workspace_detail?.slug}/profile/${activity?.actor_detail?.id}`}
|
|
className="font-medium text-primary hover:underline"
|
|
>
|
|
{activity.actor_detail?.display_name}
|
|
</Link>
|
|
)}
|
|
</>
|
|
);
|
|
}
|