import { ReactNode } from "react";
import { sanitizeIconSvg } from "~/utils/html-sanitizer";
interface Props {
className: string;
item: {
title?: string;
icon?: ReactNode;
};
}
export default function SidebarIcon({ className, item }: Props) {
let icon = item.icon;
let title = item.title;
if (typeof icon !== "string") {
return icon;
}
return (
<>
{icon && (
<>
{icon.startsWith("
) : icon.includes("http") ? (
) : (
<>>
)}
>
)}
>
);
}