From 684ba0f14aeaccf98309571736cca81a95283cf4 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Tue, 21 Nov 2023 08:54:33 +0800 Subject: [PATCH] :fire: remove label type --- .../src/components/Form/Items/Tag/index.tsx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/website/src/components/Form/Items/Tag/index.tsx b/website/src/components/Form/Items/Tag/index.tsx index 205c5ff1f0cb..004222b7a6f6 100644 --- a/website/src/components/Form/Items/Tag/index.tsx +++ b/website/src/components/Form/Items/Tag/index.tsx @@ -16,7 +16,6 @@ export type Props = { export default function TagFormItem({ onTagUpdate }: Props): JSX.Element { const [tags, setTags] = useState([]); - const [labelType, setLabelType] = useState(""); const [label, setLabel] = useState(""); const [color, setColor] = useState("#ea5252"); @@ -30,7 +29,7 @@ export default function TagFormItem({ onTagUpdate }: Props): JSX.Element { return; } if (validateTag()) { - const tag: TagType = { label: labelType + label, color }; + const tag: TagType = { label: label, color }; setTags([...tags, tag]); } }; @@ -44,9 +43,6 @@ export default function TagFormItem({ onTagUpdate }: Props): JSX.Element { const onChangeColor = (color: ColorResult) => { setColor(color.hex as TagType["color"]); }; - const onChangeLabelType = (e: { target: { value: string } }) => { - setLabelType(e.target.value); - }; return ( <> @@ -69,18 +65,6 @@ export default function TagFormItem({ onTagUpdate }: Props): JSX.Element { )} -
- 标签类型 - -
标签名称