mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Updated settings components and date filter.
This commit is contained in:
parent
4b5b4db108
commit
9d967fb0fe
23 changed files with 33 additions and 67 deletions
|
|
@ -9,7 +9,7 @@ export default function useConfig() {
|
|||
const { get } = useApi();
|
||||
|
||||
async function loadConfig() {
|
||||
const { data } = await get('/config');
|
||||
const data = await get('/config');
|
||||
loading = false;
|
||||
setConfig(data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { get, setItem } from 'next-basics';
|
||||
import { setItem } from 'next-basics';
|
||||
import { LOCALE_CONFIG } from 'lib/constants';
|
||||
import { getDateLocale, getTextDirection } from 'lib/lang';
|
||||
import useStore, { setLocale } from 'store/app';
|
||||
import useForceUpdate from 'hooks/useForceUpdate';
|
||||
import useApi from 'hooks/useApi';
|
||||
import enUS from 'public/intl/messages/en-US.json';
|
||||
|
||||
const messages = {
|
||||
|
|
@ -19,6 +20,7 @@ export default function useLocale() {
|
|||
const forceUpdate = useForceUpdate();
|
||||
const dir = getTextDirection(locale);
|
||||
const dateLocale = getDateLocale(locale);
|
||||
const { get } = useApi();
|
||||
|
||||
async function loadMessages(locale) {
|
||||
const data = await get(`${basePath}/intl/messages/${locale}.json`);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default function useShareToken(shareId) {
|
|||
const { get } = useApi();
|
||||
|
||||
async function loadToken(id) {
|
||||
const { data } = await get(`/share/${id}`);
|
||||
const data = await get(`/share/${id}`);
|
||||
|
||||
if (data) {
|
||||
setShareToken(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue