mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): use translation for unnamed workflows
This commit is contained in:
parent
6d176601cc
commit
6e028d691a
@ -5,9 +5,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
const TopCenterPanel = () => {
|
||||
const { t } = useTranslation();
|
||||
const name = useAppSelector(
|
||||
(state) => state.workflow.name || 'Untitled Workflow'
|
||||
);
|
||||
const name = useAppSelector((state) => state.workflow.name);
|
||||
const isTouched = useAppSelector((state) => state.workflow.isTouched);
|
||||
|
||||
return (
|
||||
@ -20,7 +18,7 @@ const TopCenterPanel = () => {
|
||||
fontWeight={600}
|
||||
opacity={0.8}
|
||||
>
|
||||
{name}
|
||||
{name || t('workflows.unnamedWorkflow')}
|
||||
{isTouched ? ` (${t('common.unsaved')})` : ''}
|
||||
</Text>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user