mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
ensure translation of default report name
This commit is contained in:
parent
440676ef21
commit
aa341d1dd2
2 changed files with 11 additions and 8 deletions
|
|
@ -2,18 +2,20 @@ import { produce } from 'immer';
|
|||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useTimezone } from './useTimezone';
|
||||
import useApi from './useApi';
|
||||
|
||||
const baseParameters = {
|
||||
name: 'Untitled',
|
||||
description: '',
|
||||
parameters: {},
|
||||
};
|
||||
import useMessages from './useMessages';
|
||||
|
||||
export function useReport(reportId, defaultParameters) {
|
||||
const [report, setReport] = useState(null);
|
||||
const [isRunning, setIsRunning] = useState(false);
|
||||
const { get, post } = useApi();
|
||||
const [timezone] = useTimezone();
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
const baseParameters = {
|
||||
name: formatMessage(labels.untitled),
|
||||
description: '',
|
||||
parameters: {},
|
||||
};
|
||||
|
||||
const loadReport = async id => {
|
||||
const data = await get(`/reports/${id}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue