From 4ec09730d27ac7d528a402f210aff6a1ed254022 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Mon, 22 Jan 2024 11:57:16 +0100 Subject: [PATCH] chore: remove dead code --- src/components/Text.tsx | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/components/Text.tsx b/src/components/Text.tsx index b2a9874..6fae73d 100644 --- a/src/components/Text.tsx +++ b/src/components/Text.tsx @@ -22,34 +22,3 @@ export const Text = (props: { ); -export const Text2 = (props: { children: string | Array }) => { - const text = Array.isArray(props.children) - ? props.children.join("") - : props.children; - const parts = text.split("$"); - - const nodes = parts.map((x, i) => { - let colorId = 7; - let bold = false; - if (x.startsWith("#") && x[1] && "0123456789abcdef".includes(x[1])) { - colorId = parseInt(x[1], 16); - x = x.substring(2); - - if (x[0] && x.startsWith("*")) { - bold = true; - x = x.substring(1); - } - } - - const colors = config.theme.extend.colors as Record; - const color = - colors[`color${colorId}`] ?? config.theme.extend.colors.color7; - return ( - - {x} - - ); - }); - - return nodes; -};