mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 01:25:37 +01:00
Remove className locale
This commit is contained in:
parent
d80739a203
commit
d7734d0493
5 changed files with 6 additions and 14 deletions
|
|
@ -3,7 +3,6 @@ import { safeDecodeURIComponent } from 'next-basics';
|
|||
import { colord } from 'colord';
|
||||
import classNames from 'classnames';
|
||||
import { LegendItem } from 'chart.js/auto';
|
||||
import { useLocale } from 'components/hooks';
|
||||
import styles from './Legend.module.css';
|
||||
|
||||
export function Legend({
|
||||
|
|
@ -13,8 +12,6 @@ export function Legend({
|
|||
items: any[];
|
||||
onClick: (index: LegendItem) => void;
|
||||
}) {
|
||||
const { locale } = useLocale();
|
||||
|
||||
if (!items.find(({ text }) => text)) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -32,7 +29,7 @@ export function Legend({
|
|||
onClick={() => onClick(item)}
|
||||
>
|
||||
<StatusLight color={color.alpha(color.alpha() + 0.2).toHex()}>
|
||||
<span className={locale}>{safeDecodeURIComponent(text)}</span>
|
||||
{safeDecodeURIComponent(text)}
|
||||
</StatusLight>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue