2022-10-30 11:54:14 +08:00
|
|
|
import React from 'react';
|
2024-06-11 21:17:42 +08:00
|
|
|
import { useActionContext, useRecord } from '@tachybase/client';
|
|
|
|
|
2022-10-30 11:54:14 +08:00
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
2024-03-25 14:46:22 +08:00
|
|
|
import { getWorkflowExecutionsPath } from './utils';
|
2022-10-30 11:54:14 +08:00
|
|
|
|
|
|
|
export const ExecutionLink = () => {
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { id } = useRecord();
|
|
|
|
const { setVisible } = useActionContext();
|
|
|
|
return (
|
2023-11-13 11:01:18 +08:00
|
|
|
<Link to={getWorkflowExecutionsPath(id)} onClick={() => setVisible(false)}>
|
2023-04-25 13:12:14 +08:00
|
|
|
{t('View')}
|
|
|
|
</Link>
|
2022-10-30 11:54:14 +08:00
|
|
|
);
|
2023-04-25 13:12:14 +08:00
|
|
|
};
|