Merge branch 'main' into patch-1

This commit is contained in:
Millun Atluri 2023-12-22 08:37:15 +11:00 committed by GitHub
commit d5134325f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,11 +2,14 @@ import { Text } from '@chakra-ui/layout';
import { useAppSelector } from 'app/store/storeHooks';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
const TopCenterPanel = () => {
const { t } = useTranslation();
const name = useAppSelector((state) => state.workflow.name);
const isTouched = useAppSelector((state) => state.workflow.isTouched);
const isWorkflowLibraryEnabled =
useFeatureStatus('workflowLibrary').isFeatureEnabled;
return (
<Text
@ -19,7 +22,7 @@ const TopCenterPanel = () => {
opacity={0.8}
>
{name || t('workflows.unnamedWorkflow')}
{isTouched ? ` (${t('common.unsaved')})` : ''}
{isTouched && isWorkflowLibraryEnabled ? ` (${t('common.unsaved')})` : ''}
</Text>
);
};