diff --git a/src/components/common/Style.tsx b/src/components/common/Style.tsx index 511d36f2..f0297311 100644 --- a/src/components/common/Style.tsx +++ b/src/components/common/Style.tsx @@ -1,19 +1,14 @@ -import { memo } from "react" +import { HTMLAttributes, memo } from "react" import { toGateway } from "~/lib/ipfs-parser" const Style = memo(function Style({ - content, children, -}: { - content?: string - children?: React.ReactNode[] -}) { - let css = content - if (!css && typeof children?.[0] === "string") { - css = children[0].trim() - } - if (!css) { +}: HTMLAttributes) { + let css: string | null = null + if (typeof children === "string") { + css = children.trim() + } else { return null } diff --git a/src/components/site/CustomSiteStyle.tsx b/src/components/site/CustomSiteStyle.tsx index 266e13e3..ac316da2 100644 --- a/src/components/site/CustomSiteStyle.tsx +++ b/src/components/site/CustomSiteStyle.tsx @@ -49,5 +49,5 @@ export const CustomSiteStyle: FC<{ } }, []) - return }