2023-08-11 11:48:33 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
// types
|
2024-05-16 07:37:47 +00:00
|
|
|
import { issuePriorityFilter } from "@/constants/issue";
|
|
|
|
import { TIssueFilterPriority } from "@/types/issue";
|
2023-08-11 11:48:33 +00:00
|
|
|
// constants
|
|
|
|
|
2024-05-16 07:37:47 +00:00
|
|
|
export const IssueBlockPriority = ({ priority }: { priority: TIssueFilterPriority | null }) => {
|
2023-08-11 11:48:33 +00:00
|
|
|
const priority_detail = priority != null ? issuePriorityFilter(priority) : null;
|
|
|
|
|
|
|
|
if (priority_detail === null) return <></>;
|
2023-09-01 11:12:30 +00:00
|
|
|
|
2023-08-11 11:48:33 +00:00
|
|
|
return (
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className={`grid h-6 w-6 place-items-center rounded border-[0.5px] ${priority_detail?.className}`}>
|
2023-09-01 11:12:30 +00:00
|
|
|
<span className="material-symbols-rounded text-sm">{priority_detail?.icon}</span>
|
2023-08-11 11:48:33 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|