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