2024-03-06 08:54:36 +00:00
|
|
|
// components
|
|
|
|
// ui
|
|
|
|
import { Loader } from "@plane/ui";
|
|
|
|
// types
|
|
|
|
import { IUserPriorityDistribution } from "@plane/types";
|
2024-03-06 13:09:14 +00:00
|
|
|
import { PriorityDistributionContent } from "./main-content";
|
2024-03-06 08:54:36 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
priorityDistribution: IUserPriorityDistribution[] | undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ProfilePriorityDistribution: React.FC<Props> = (props) => {
|
|
|
|
const { priorityDistribution } = props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="flex flex-col space-y-2">
|
|
|
|
<h3 className="text-lg font-medium">Issues by priority</h3>
|
|
|
|
{priorityDistribution ? (
|
|
|
|
<PriorityDistributionContent priorityDistribution={priorityDistribution} />
|
|
|
|
) : (
|
|
|
|
<div className="grid place-items-center p-7">
|
|
|
|
<Loader className="flex items-end gap-12">
|
|
|
|
<Loader.Item width="30px" height="200px" />
|
|
|
|
<Loader.Item width="30px" height="150px" />
|
|
|
|
<Loader.Item width="30px" height="250px" />
|
|
|
|
<Loader.Item width="30px" height="150px" />
|
|
|
|
<Loader.Item width="30px" height="100px" />
|
|
|
|
</Loader>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|