mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-02-15 07:53:10 +00:00
WIP
This commit is contained in:
@@ -25,8 +25,10 @@ function renderStringWithChannelRefs(value: string) {
|
||||
export const ChannelReferenceRenderer = ({
|
||||
children,
|
||||
}: React.PropsWithChildren<{}>) => {
|
||||
// TODO: this should probably walk the tree
|
||||
if (typeof children[0] === "string")
|
||||
return renderStringWithChannelRefs(children[0]);
|
||||
// TODO: this must be made sound
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const c0 = children[0];
|
||||
if (typeof c0 === "string") return renderStringWithChannelRefs(c0);
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user