mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Dynamically fetch language bundles at runtime.
This commit is contained in:
parent
73e83ad767
commit
f91cc82c82
20 changed files with 95 additions and 132 deletions
|
|
@ -27,7 +27,7 @@ import styles from './Calendar.module.css';
|
|||
import Icon from './Icon';
|
||||
|
||||
export default function Calendar({ date, minDate, maxDate, onChange }) {
|
||||
const [locale] = useLocale();
|
||||
const { locale } = useLocale();
|
||||
const [selectMonth, setSelectMonth] = useState(false);
|
||||
const [selectYear, setSelectYear] = useState(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const filterOptions = [
|
|||
];
|
||||
|
||||
function DateFilter({ value, startDate, endDate, onChange, className }) {
|
||||
const [locale] = useLocale();
|
||||
const { locale } = useLocale();
|
||||
const [showPicker, setShowPicker] = useState(false);
|
||||
const displayValue =
|
||||
value === 'custom' ? (
|
||||
|
|
@ -102,7 +102,7 @@ function DateFilter({ value, startDate, endDate, onChange, className }) {
|
|||
}
|
||||
|
||||
const CustomRange = ({ startDate, endDate, onClick }) => {
|
||||
const [locale] = useLocale();
|
||||
const { locale } = useLocale();
|
||||
|
||||
function handleClick(e) {
|
||||
e.stopPropagation();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import useLocale from 'hooks/useLocale';
|
|||
|
||||
function RefreshButton({ websiteId }) {
|
||||
const dispatch = useDispatch();
|
||||
const [locale] = useLocale();
|
||||
const { locale } = useLocale();
|
||||
const [dateRange] = useDateRange(websiteId);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const completed = useSelector(state => state.queries[`/api/website/${websiteId}/stats`]);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function WorldMap({ data, className }) {
|
|||
}),
|
||||
[theme],
|
||||
);
|
||||
const [locale] = useLocale();
|
||||
const { locale } = useLocale();
|
||||
const countryNames = useCountryNames(locale);
|
||||
|
||||
function getFillColor(code) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue