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-09-01 11:12:30 +00:00
|
|
|
<div className={`h-6 w-6 rounded grid place-items-center border-[0.5px] ${priority_detail?.className}`}>
|
|
|
|
<span className="material-symbols-rounded text-sm">{priority_detail?.icon}</span>
|
2023-08-11 11:48:33 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|