mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Fix issue with unicode filtering. Closes #1258
This commit is contained in:
parent
be8291c856
commit
358c725828
@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import Button from 'components/common/Button';
|
import Button from 'components/common/Button';
|
||||||
import Times from 'assets/times.svg';
|
import Times from 'assets/times.svg';
|
||||||
|
import { safeDecodeURI } from 'lib/url';
|
||||||
import styles from './FilterTags.module.css';
|
import styles from './FilterTags.module.css';
|
||||||
|
|
||||||
export default function FilterTags({ params, onClick }) {
|
export default function FilterTags({ params, onClick }) {
|
||||||
@ -17,7 +18,7 @@ export default function FilterTags({ params, onClick }) {
|
|||||||
return (
|
return (
|
||||||
<div key={key} className={styles.tag}>
|
<div key={key} className={styles.tag}>
|
||||||
<Button icon={<Times />} onClick={() => onClick(key)} variant="action" iconRight>
|
<Button icon={<Times />} onClick={() => onClick(key)} variant="action" iconRight>
|
||||||
{`${key}: ${params[key]}`}
|
{`${key}: ${safeDecodeURI(params[key])}`}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -41,7 +41,7 @@ export default async (req, res) => {
|
|||||||
const stats = Object.keys(metrics[0]).reduce((obj, key) => {
|
const stats = Object.keys(metrics[0]).reduce((obj, key) => {
|
||||||
obj[key] = {
|
obj[key] = {
|
||||||
value: Number(metrics[0][key]) || 0,
|
value: Number(metrics[0][key]) || 0,
|
||||||
change: Number(metrics[0][key] - prevPeriod[0][key]) || 0,
|
change: Number(metrics[0][key]) - Number(prevPeriod[0][key]) || 0,
|
||||||
};
|
};
|
||||||
return obj;
|
return obj;
|
||||||
}, {});
|
}, {});
|
||||||
|
Loading…
Reference in New Issue
Block a user