feat: translate graph list #918 (#1426)

### What problem does this PR solve?

feat: translate graph list #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-08 18:14:34 +08:00
committed by GitHub
parent 98295caffe
commit 1eb1f7ad33
5 changed files with 10 additions and 2 deletions

View File

@ -70,7 +70,7 @@ const CreateFlowModal = ({
<Input />
</Form.Item>
</Form>
<Title level={5}>Create from templates</Title>
<Title level={5}>{t('createFromTemplates', { keyPrefix: 'flow' })}</Title>
<Flex vertical gap={16} className={styles.templatesBox}>
{list?.map((x) => (
<Card

View File

@ -4,6 +4,7 @@ import CreateFlowModal from './create-flow-modal';
import FlowCard from './flow-card';
import { useFetchDataOnMount, useSaveFlow } from './hooks';
import { useTranslate } from '@/hooks/commonHooks';
import styles from './index.less';
const FlowList = () => {
@ -14,6 +15,7 @@ const FlowList = () => {
flowSettingLoading,
onFlowOk,
} = useSaveFlow();
const { t } = useTranslate('flow');
const { list, loading } = useFetchDataOnMount();
@ -25,7 +27,7 @@ const FlowList = () => {
icon={<PlusOutlined />}
onClick={showFlowSettingModal}
>
create canvas
{t('create')}
</Button>
</Flex>
<Spin spinning={loading}>