2022-03-27 15:51:48 +08:00
|
|
|
import React from 'react';
|
2022-04-30 10:06:25 +08:00
|
|
|
import { useTranslation } from 'react-i18next';
|
2022-03-27 15:51:48 +08:00
|
|
|
import { Link } from 'react-router-dom';
|
2022-06-29 23:42:03 +08:00
|
|
|
|
|
|
|
import { useActionContext, useRecord } from '@nocobase/client';
|
2022-03-27 15:51:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
export const WorkflowLink = () => {
|
2022-04-30 10:06:25 +08:00
|
|
|
const { t } = useTranslation();
|
2022-03-27 15:51:48 +08:00
|
|
|
const { id } = useRecord();
|
|
|
|
const { setVisible } = useActionContext();
|
|
|
|
return (
|
2022-10-30 11:54:14 +08:00
|
|
|
<Link to={`/admin/settings/workflow/workflows/${id}`} onClick={() => setVisible(false)}>{t('View')}</Link>
|
2022-03-27 15:51:48 +08:00
|
|
|
);
|
|
|
|
}
|