- Add jscodeshift-based codemod to convert arrow function components to function declarations - Support React.FC, observer-wrapped, and forwardRef components - Include comprehensive test suite covering edge cases - Add npm script to run transformer across codebase - Target only .tsx files in source directories, excluding node_modules and declaration files * [WEB-5459] chore: updates after running codemod --------- Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
32 lines
900 B
TypeScript
32 lines
900 B
TypeScript
"use client";
|
|
|
|
import type { FC } from "react";
|
|
// plane imports
|
|
import type { EProjectFeatureKey } from "@plane/constants";
|
|
// local components
|
|
import { ProjectBreadcrumb } from "./project";
|
|
import { ProjectFeatureBreadcrumb } from "./project-feature";
|
|
|
|
type TCommonProjectBreadcrumbProps = {
|
|
workspaceSlug: string;
|
|
projectId: string;
|
|
featureKey?: EProjectFeatureKey;
|
|
isLast?: boolean;
|
|
};
|
|
|
|
export function CommonProjectBreadcrumbs(props: TCommonProjectBreadcrumbProps) {
|
|
const { workspaceSlug, projectId, featureKey, isLast = false } = props;
|
|
return (
|
|
<>
|
|
<ProjectBreadcrumb workspaceSlug={workspaceSlug} projectId={projectId} />
|
|
{featureKey && (
|
|
<ProjectFeatureBreadcrumb
|
|
workspaceSlug={workspaceSlug?.toString()}
|
|
projectId={projectId?.toString()}
|
|
featureKey={featureKey}
|
|
isLast={isLast}
|
|
/>
|
|
)}
|
|
</>
|
|
);
|
|
}
|