From a00b0df4d8f0973c9af52412773d5a4d8b660dac Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Thu, 8 Aug 2024 15:41:48 +0100 Subject: [PATCH] chore: `IndexSidebar` class --- framework/core/js/src/common/utils/isDark.ts | 5 ++++- framework/core/js/src/forum/components/IndexSidebar.tsx | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/core/js/src/common/utils/isDark.ts b/framework/core/js/src/common/utils/isDark.ts index fd0ea4b61f..a6b92d8447 100644 --- a/framework/core/js/src/common/utils/isDark.ts +++ b/framework/core/js/src/common/utils/isDark.ts @@ -17,7 +17,10 @@ export default function isDark(hexcolor: string | null): boolean { let hexnumbers = hexcolor.replace('#', ''); if (hexnumbers.length === 3) { - hexnumbers = hexnumbers.split('').map(char => char.repeat(2)).join(''); + hexnumbers = hexnumbers + .split('') + .map((char) => char.repeat(2)) + .join(''); } const r = parseInt(hexnumbers.slice(0, 2), 16); diff --git a/framework/core/js/src/forum/components/IndexSidebar.tsx b/framework/core/js/src/forum/components/IndexSidebar.tsx index b7fe99d88f..4595f0486a 100644 --- a/framework/core/js/src/forum/components/IndexSidebar.tsx +++ b/framework/core/js/src/forum/components/IndexSidebar.tsx @@ -7,13 +7,14 @@ import Button from '../../common/components/Button'; import SelectDropdown from '../../common/components/SelectDropdown'; import listItems from '../../common/helpers/listItems'; import LinkButton from '../../common/components/LinkButton'; +import classList from '../../common/utils/classList'; export interface IndexSidebarAttrs extends ComponentAttrs {} export default class IndexSidebar extends Component { view(vnode: Mithril.Vnode): Mithril.Children { return ( -