diff --git a/components/empty/empty.tsx b/components/empty/empty.tsx index c382a34ab3..75a4aa5c0b 100644 --- a/components/empty/empty.tsx +++ b/components/empty/empty.tsx @@ -6,14 +6,9 @@ const Empty: React.FC = () => { const [, token] = useToken(); const bgColor = new TinyColor(token.colorBgBase); - let themeStyle: React.CSSProperties = {}; // Dark Theme need more dark of this - if (bgColor.toHsl().l < 0.5) { - themeStyle = { - opacity: 0.65, - }; - } + const themeStyle: React.CSSProperties = bgColor.toHsl().l < 0.5 ? { opacity: 0.65 } : {}; return (