2024-01-18 10:19:54 +00:00
|
|
|
import Image from "next/image";
|
|
|
|
import { useTheme } from "next-themes";
|
|
|
|
// types
|
2024-01-24 14:11:02 +00:00
|
|
|
import { TIssuesListTypes } from "@plane/types";
|
2024-01-18 10:19:54 +00:00
|
|
|
// constants
|
|
|
|
import { CREATED_ISSUES_EMPTY_STATES } from "constants/dashboard";
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
type: TIssuesListTypes;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const CreatedIssuesEmptyState: 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 = CREATED_ISSUES_EMPTY_STATES[type];
|
|
|
|
|
|
|
|
const image = resolvedTheme === "dark" ? typeDetails.darkImage : typeDetails.lightImage;
|
|
|
|
|
|
|
|
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">
|
|
|
|
<Image src={image} className="w-full h-full" alt="Assigned issues" />
|
2024-01-18 10:19:54 +00:00
|
|
|
</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>
|
|
|
|
);
|
|
|
|
};
|