mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Updated share token logic. Closes #1113.
This commit is contained in:
parent
b5de6b997e
commit
e735a1c50d
12 changed files with 44 additions and 42 deletions
|
|
@ -6,14 +6,11 @@ import ErrorMessage from 'components/common/ErrorMessage';
|
|||
import useFetch from 'hooks/useFetch';
|
||||
import useDateRange from 'hooks/useDateRange';
|
||||
import usePageQuery from 'hooks/usePageQuery';
|
||||
import useShareToken from 'hooks/useShareToken';
|
||||
import { formatShortTime, formatNumber, formatLongNumber } from 'lib/format';
|
||||
import { TOKEN_HEADER } from 'lib/constants';
|
||||
import MetricCard from './MetricCard';
|
||||
import styles from './MetricsBar.module.css';
|
||||
|
||||
export default function MetricsBar({ websiteId, className }) {
|
||||
const shareToken = useShareToken();
|
||||
const [dateRange] = useDateRange(websiteId);
|
||||
const { startDate, endDate, modified } = dateRange;
|
||||
const [format, setFormat] = useState(true);
|
||||
|
|
@ -34,7 +31,6 @@ export default function MetricsBar({ websiteId, className }) {
|
|||
device,
|
||||
country,
|
||||
},
|
||||
headers: { [TOKEN_HEADER]: shareToken?.token },
|
||||
},
|
||||
[modified, url, referrer, os, browser, device, country],
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue