Skip to content

Commit a2fdab6

Browse files
authored
Merge pull request #728 from mikecao/dev
v1.19.0
2 parents 0653570 + 25085cb commit a2fdab6

28 files changed

+958
-568
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/build
1818
/public/umami.js
1919
/public/geo
20+
/public/lang
2021
/lang-compiled
2122

2223
# misc

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A detailed getting started guide can be found at [https://umami.is/docs/](https:
1010

1111
### Requirements
1212

13-
- A server with Node.js 10.13 or newer
13+
- A server with Node.js 12 or newer
1414
- A database (MySQL or Postgresql)
1515

1616
### Get the source code and install packages

components/common/Calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import styles from './Calendar.module.css';
2727
import Icon from './Icon';
2828

2929
export default function Calendar({ date, minDate, maxDate, onChange }) {
30-
const [locale] = useLocale();
30+
const { locale } = useLocale();
3131
const [selectMonth, setSelectMonth] = useState(false);
3232
const [selectYear, setSelectYear] = useState(false);
3333

components/common/DateFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const filterOptions = [
5555
];
5656

5757
function DateFilter({ value, startDate, endDate, onChange, className }) {
58-
const [locale] = useLocale();
58+
const { locale } = useLocale();
5959
const [showPicker, setShowPicker] = useState(false);
6060
const displayValue =
6161
value === 'custom' ? (
@@ -102,7 +102,7 @@ function DateFilter({ value, startDate, endDate, onChange, className }) {
102102
}
103103

104104
const CustomRange = ({ startDate, endDate, onClick }) => {
105-
const [locale] = useLocale();
105+
const { locale } = useLocale();
106106

107107
function handleClick(e) {
108108
e.stopPropagation();

components/common/RefreshButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import useLocale from 'hooks/useLocale';
1212

1313
function RefreshButton({ websiteId }) {
1414
const dispatch = useDispatch();
15-
const [locale] = useLocale();
15+
const { locale } = useLocale();
1616
const [dateRange] = useDateRange(websiteId);
1717
const [loading, setLoading] = useState(false);
1818
const completed = useSelector(state => state.queries[`/api/website/${websiteId}/stats`]);

components/common/WorldMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function WorldMap({ data, className }) {
2424
}),
2525
[theme],
2626
);
27-
const [locale] = useLocale();
27+
const { locale } = useLocale();
2828
const countryNames = useCountryNames(locale);
2929

3030
function getFillColor(code) {

components/layout/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { rtlLocales } from 'lib/lang';
99

1010
export default function Footer() {
1111
const { current } = useVersion();
12-
const [locale] = useLocale();
12+
const { locale } = useLocale();
1313

1414
return (
1515
<footer className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>

components/layout/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Bars from 'assets/bars.svg';
1919
export default function Header() {
2020
const user = useSelector(state => state.user);
2121
const [active, setActive] = useState(false);
22-
const [locale] = useLocale();
22+
const { locale } = useLocale();
2323

2424
function handleClick() {
2525
setActive(state => !state);

components/layout/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import useLocale from 'hooks/useLocale';
66
import { rtlLocales } from 'lib/lang';
77

88
export default function Layout({ title, children, header = true, footer = true }) {
9-
const [locale] = useLocale();
9+
const { locale } = useLocale();
1010
const dir = rtlLocales.includes(locale) ? 'rtl' : 'ltr';
1111

1212
return (

components/metrics/BarChart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function BarChart({
2727
const canvas = useRef();
2828
const chart = useRef();
2929
const [tooltip, setTooltip] = useState(null);
30-
const [locale] = useLocale();
30+
const { locale } = useLocale();
3131
const [theme] = useTheme();
3232
const forceUpdate = useForceUpdate();
3333

0 commit comments

Comments
 (0)