2024-01-18 10:19:54 +00:00
|
|
|
import Image from "next/image";
|
|
|
|
import { useTheme } from "next-themes";
|
|
|
|
// types
|
2024-03-06 13:09:14 +00:00
|
|
|
import { ASSIGNED_ISSUES_EMPTY_STATES } from "constants/dashboard";
|
2024-01-24 14:11:02 +00:00
|
|
|
import { TIssuesListTypes } from "@plane/types";
|
2024-01-18 10:19:54 +00:00
|
|
|
// constants
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
type: TIssuesListTypes;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const AssignedIssuesEmptyState: React.FC<Props> = (props) => {
|
2024-01-24 14:11:02 +00:00
|
|
|
const { type } = props;
|
2024-01-18 10:19:54 +00:00
|
|
|
// next-themes
|
|
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
|
|
|
|
const typeDetails = ASSIGNED_ISSUES_EMPTY_STATES[type];
|
|
|
|
|
|
|
|
const image = resolvedTheme === "dark" ? typeDetails.darkImage : typeDetails.lightImage;
|
|
|
|
|
2024-01-24 14:11:02 +00:00
|
|
|
// TODO: update empty state logic to use a general component
|
2024-01-18 10:19:54 +00:00
|
|
|
return (
|
2024-01-24 14:11:02 +00:00
|
|
|
<div className="text-center space-y-6 flex flex-col items-center">
|
|
|
|
<div className="h-24 w-24">
|
2024-01-18 10:19:54 +00:00
|
|
|
<Image src={image} className="w-full h-full" alt="Assigned issues" />
|
|
|
|
</div>
|
2024-01-24 14:11:02 +00:00
|
|
|
<p className="text-sm font-medium text-custom-text-300 whitespace-pre-line">{typeDetails.title}</p>
|
2024-01-18 10:19:54 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|