mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Added timezone and default date range settings.
This commit is contained in:
parent
bcd765e9d3
commit
33ac026637
30 changed files with 186 additions and 63 deletions
|
|
@ -1,11 +1,14 @@
|
|||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { updateApp } from 'redux/actions/app';
|
||||
import { setItem } from 'lib/web';
|
||||
import { LOCALE_CONFIG } from 'lib/constants';
|
||||
|
||||
export default function useLocale() {
|
||||
const locale = useSelector(state => state.app.locale);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
function setLocale(value) {
|
||||
setItem(LOCALE_CONFIG, value);
|
||||
dispatch(updateApp({ locale: value }));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue