tachybase_todo/packages/plugins/multi-app-manager/src/client/AppManager.tsx
chenos 883f1e6fd1
fix: eslint (#1759)
* fix: eslint

* fix: eslint --fix

* fix: changelog
2023-04-25 13:12:14 +08:00

24 lines
619 B
TypeScript

import { SchemaComponent, useRecord } from '@nocobase/client';
import { Card } from 'antd';
import React from 'react';
import { schema } from './settings/schemas/applications';
import { usePluginUtils } from './utils';
const AppVisitor = () => {
const record = useRecord();
const { t } = usePluginUtils();
return (
<a href={`/apps/${record.name}/admin/`} target={'_blank'} rel="noreferrer">
{t('View', { ns: 'client' })}
</a>
);
};
export const AppManager = () => {
return (
<Card bordered={false}>
<SchemaComponent schema={schema} components={{ AppVisitor }} />
</Card>
);
};