mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +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
|
|
@ -20,6 +20,7 @@ export function ReportHeader({ icon }) {
|
|||
|
||||
const { name, description, parameters } = report || {};
|
||||
const { websiteId, dateRange } = parameters || {};
|
||||
const defaultName = formatMessage(labels.untitled);
|
||||
|
||||
const handleSave = async () => {
|
||||
if (!report.id) {
|
||||
|
|
@ -39,7 +40,7 @@ export function ReportHeader({ icon }) {
|
|||
};
|
||||
|
||||
const handleNameChange = name => {
|
||||
updateReport({ name: name || 'Untitled' });
|
||||
updateReport({ name: name || defaultName });
|
||||
};
|
||||
|
||||
const handleDescriptionChange = description => {
|
||||
|
|
@ -54,7 +55,7 @@ export function ReportHeader({ icon }) {
|
|||
key={name}
|
||||
name="name"
|
||||
value={name}
|
||||
placeholder={formatMessage(labels.untitled)}
|
||||
placeholder={defaultName}
|
||||
onCommit={handleNameChange}
|
||||
/>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue