2023-08-11 11:48:33 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
// types
|
2023-09-01 11:12:30 +00:00
|
|
|
import { TIssuePriorityKey } from "types/issue";
|
2023-08-11 11:48:33 +00:00
|
|
|
// constants
|
|
|
|
import { issuePriorityFilter } from "constants/data";
|
|
|
|
|
|
|
|
export const IssueBlockPriority = ({ priority }: { priority: TIssuePriorityKey | null }) => {
|
|
|
|
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>
|
|
|
|
);
|
|
|
|
};
|