forked from github/plane
ea728a385f
* chore: unnecessary console log removed * chore: in_use sentry issue resolved * chore: detail sentry issue resolved * fix: updated project logo validation in project icon --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
35 lines
789 B
TypeScript
35 lines
789 B
TypeScript
// helpers
|
|
import { TProjectLogoProps } from "@plane/types";
|
|
import { cn } from "@/helpers/common.helper";
|
|
// types
|
|
|
|
type Props = {
|
|
className?: string;
|
|
logo: TProjectLogoProps;
|
|
};
|
|
|
|
export const ProjectLogo: React.FC<Props> = (props) => {
|
|
const { className, logo } = props;
|
|
|
|
if (logo?.in_use === "icon" && logo?.icon)
|
|
return (
|
|
<span
|
|
style={{
|
|
color: logo.icon.color,
|
|
}}
|
|
className={cn("material-symbols-rounded text-base", className)}
|
|
>
|
|
{logo.icon.name}
|
|
</span>
|
|
);
|
|
|
|
if (logo?.in_use === "emoji" && logo?.emoji)
|
|
return (
|
|
<span className={cn("text-base", className)}>
|
|
{logo.emoji.value?.split("-").map((emoji) => String.fromCodePoint(parseInt(emoji, 10)))}
|
|
</span>
|
|
);
|
|
|
|
return <></>;
|
|
};
|