2024-03-06 13:45:48 +00:00
|
|
|
// helpers
|
|
|
|
import { TProjectLogoProps } from "@plane/types";
|
2024-03-19 14:38:35 +00:00
|
|
|
import { cn } from "@/helpers/common.helper";
|
|
|
|
// types
|
2024-03-06 13:45:48 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
className?: string;
|
|
|
|
logo: TProjectLogoProps;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ProjectLogo: React.FC<Props> = (props) => {
|
|
|
|
const { className, logo } = props;
|
|
|
|
|
2024-03-06 15:17:38 +00:00
|
|
|
if (logo && logo.in_use === "icon" && logo.icon)
|
2024-03-06 13:45:48 +00:00
|
|
|
return (
|
|
|
|
<span
|
|
|
|
style={{
|
|
|
|
color: logo.icon.color,
|
|
|
|
}}
|
|
|
|
className={cn("material-symbols-rounded text-base", className)}
|
|
|
|
>
|
|
|
|
{logo.icon.name}
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
|
2024-03-06 15:17:38 +00:00
|
|
|
if (logo && logo.in_use === "emoji" && logo.emoji)
|
2024-03-06 13:45:48 +00:00
|
|
|
return (
|
|
|
|
<span className={cn("text-base", className)}>
|
|
|
|
{logo.emoji.value?.split("-").map((emoji) => String.fromCodePoint(parseInt(emoji, 10)))}
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
|
|
|
|
return <span />;
|
|
|
|
};
|