From 6819fe2ed7388b34315f97a9e9d8e0aa5e454baa Mon Sep 17 00:00:00 2001 From: elvis liao <1219585136@qq.com> Date: Thu, 21 Nov 2024 09:56:11 +0800 Subject: [PATCH] chore(ColorPicker): remove meaningless code --- src/color-picker/components/panel/header.tsx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/color-picker/components/panel/header.tsx b/src/color-picker/components/panel/header.tsx index 690f72e947..e7c93de067 100644 --- a/src/color-picker/components/panel/header.tsx +++ b/src/color-picker/components/panel/header.tsx @@ -26,17 +26,13 @@ const Header = (props: ColorPanelHeaderProps) => { return (
- {colorModes?.length === 1 ? ( - COLOR_MODES[colorModes[0]] - ) : ( - - {Object.keys(COLOR_MODES).map((key) => ( - - {t(local[COLOR_MODES[key]])} - - ))} - - )} + + {Object.keys(COLOR_MODES).map((key) => ( + + {t(local[COLOR_MODES[key]])} + + ))} +
);