mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Added useLocale hook.
This commit is contained in:
parent
7e26c9571e
commit
52acb691ad
5 changed files with 24 additions and 14 deletions
|
|
@ -2,10 +2,10 @@ import React, { useState, useRef, useEffect } from 'react';
|
|||
import ReactTooltip from 'react-tooltip';
|
||||
import classNames from 'classnames';
|
||||
import ChartJS from 'chart.js';
|
||||
import styles from './BarChart.module.css';
|
||||
import { formatLongNumber } from 'lib/format';
|
||||
import { dateFormat } from 'lib/lang';
|
||||
import { useSelector } from 'react-redux';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import styles from './BarChart.module.css';
|
||||
|
||||
export default function BarChart({
|
||||
chartId,
|
||||
|
|
@ -22,7 +22,7 @@ export default function BarChart({
|
|||
const canvas = useRef();
|
||||
const chart = useRef();
|
||||
const [tooltip, setTooltip] = useState({});
|
||||
const locale = useSelector(state => state.app.locale);
|
||||
const [locale] = useLocale();
|
||||
|
||||
function renderXLabel(label, index, values) {
|
||||
const d = new Date(values[index].value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue